Tableau: Create histogram bins using calculated field

81 Views Asked by At

I am trying to create a histogram on Tableau using a calculated field but I am unable to do so.

The following are the relevant dimensions & measures in my data source:

Dimension(s):

  1. Customer Name

Measure(s):

  1. Total Units (Continuous)
  2. Rate (Continuous)
  3. Paid Amount (Continous)

Calculated Field(s):

  1. Median Rate Discount: This field is calculated using the formula:

MEDIAN( 1- ( ([Rate]*[Total Units])/SUM[Paid Amount] )

Once I have the calculated field Median Rate Discount, I am unable to create bins as it does not give me an option. The histogram would be represent various customers.

I understand that the issue is related to the fact that this calculated field contains aggregation but I do not know how I can fix it.

Additionally, I would also like to a histogram after creating another calculated field using MAX[Rate] before generating the Median Max Rate Discount field using the formula shared above. Would this field have a separate type of problem?

0

There are 0 best solutions below