Last Modified Date: 15 Mar 2018
ResolutionIn order to return the same results for upper/lower hinge on a Box Plot and 75th/25th percentile in a calculated field, ensure the that the level of detail used to compute the percentile is the same between views.
Box plots in Tableau Desktop use the function WINDOW_PERCENTILE(), which means that Tableau Desktop uses the level of detail in the view to compute the percentile value.
For example, in the attached example workbook on the "Box Plot - sum of sales per customer" worksheet, each circle is the sum of sales for a customer. To find the upper hinge, Tableau Desktop first sums sales up for each customer, then finds the sum that is the 75th percentile of these sums.
In comparison, the worksheet "Crosstab - sum of sales per customer" finds the same result with a calculated field with the following formula:
WINDOW_PERCENTILE( SUM( [Sales] ), .75 )