3 Replies Latest reply on Nov 15, 2018 12:04 PM by Jim Dehner

# How does Tableau compute Percentile?

Hello,

I have read other threads and articles about it still not clear. For one of my charts, I am trying to calculate quartiles then moved to percentile. Time to complete itself is a field having subtractions of 2 values resulting in days-hours it took to complete the task. For example-

I have different categories/items (A - [A1, A2, A3, A4], B-[B1, B2, B3, B4]) etc. and for one of the categories (say B) my calculated field is

PERCENTILE(TimetoComplete,.5/.75 /.99.)

Name List of TimeToCompletes for B

B1     5.25

B2     7.98

B3     13.00

B4     12.15

B5     11.98

B6     7.77

B7     6.99

B8    13.00

I get 8.9 (50 percentile) 12.3 (75th) and 13.00 (as the 99th) for the B category. Question is-  can you break down on how it is computing, by doing average, how is it getting the values?

• ###### 1. Re: How does Tableau compute Percentile?

Hi

Percentile in all its forms is doing a count of the points in your viz - in your example there are 8 - it then counts the points and divides them in 2 groups based on the "Value" - in the .5 example that equates to 4 points above the returned value and 4 points below - for .75 it is 2 points above and 6 below (25% and 75% of the points )

When the boundary falls between 2 point Percentile will do an interpolation to come up with a value -

Does that help

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: How does Tableau compute Percentile?

So, for the 75th percentile.. First tableau gets the 75 % by (total number) *.75 gives us the value of the index when we see is value on that index ?

• ###### 3. Re: How does Tableau compute Percentile?

it is based on Marks for the filtered view-  it then returns a value of the MEASURE that equates to the boundary -

so if the number of points is 100 and  if the sum of sales is  \$100 for the value 75th and \$90 for the 76th  Percentile will return \$95  half way between the 2 values

NOT the index

Jim