
1. Re: Calculation of 95th percentile
Prashant Sharma Jan 28, 2014 11:24 PM (in response to Brijesh Mishra) 
2. Re: Calculation of 95th percentile
Brijesh Mishra Jan 28, 2014 11:49 PM (in response to Prashant Sharma)Hi Prashant.
This is a feature available in version 8.1 and I am on 8.0. So I will need to calculate a final value using calculations only.
Can you please tell me a way to sort the rows on basis of Fucntional Group and then find 0.95*total records and finally showing that nth record against the functional group. I tried to follow this link but unable to use it correctly in my workbook.
http://community.tableau.com/thread/113243
Thanks,
Brijesh

3. Re: Re: Calculation of 95th percentile
Richard Leeke Jan 29, 2014 12:37 AM (in response to Brijesh Mishra)Here you go.
Points to note:
1) I copied in the formula from that thread as a new calculated field.
2) I included [Days Open] as a dimension on level of detail (the calculation needs to see all of the distinct values for the field for which you want the percentile).
3) I set the Compute Using for the percentile calculation to [Days Open].
4) I added another calculated field [Is First?] to allow filtering down to just a single row per partition, after calculating the percentile. That just checks to see if the row is the first row in the partition. Note that the compute using setting must be the same on that field as on the percentile calculation.
By the way, there's a slightly updated version of the description of that calculation in the Tableau Calculation Reference Library, here.

P 95 Calc RL.twbx 18.1 KB


4. Re: Calculation of 95th percentile
Brijesh Mishra Jan 29, 2014 9:17 PM (in response to Richard Leeke)Thanks so much Rick. You are a genius .

5. Re: Re: Calculation of 95th percentile
Brijesh Mishra Feb 11, 2014 5:15 AM (in response to Richard Leeke)Hi Rick,
I am trying to calculate total for percentile now, but when I go to Analysis and choose the option to show total, it is returning me a number of records. Can you please tell me how to calculate total in same workbook.
Thanks,
Brijesh.

6. Re: Re: Calculation of 95th percentile
Richard Leeke Feb 14, 2014 1:53 PM (in response to Brijesh Mishra)I've added a second copy of the percentile calculation onto the sheet  this time with the partitioning set differently so that it calculates the overall 95th percentile. I haven't tried to format it nicely.

P 95 Calc RL2.twbx 17.5 KB


7. Re: Calculation of 95th percentile
Brijesh Mishra Feb 23, 2014 10:33 PM (in response to Richard Leeke)Thanks Rick. This kind of solves my purpose. But my main requirement is to show the toal P95 in the same column. Like enabling Sub Toatal and Grand Total from Analysis tab. Is there a possibility to do it.
Regards,
Brijesh

8. Re: Calculation of 95th percentile
Ademola Okuneye Mar 20, 2014 1:46 PM (in response to Brijesh Mishra)Can you please help me with calculating the P95 by group in attached file?
I've tried the forumulas in the forum but not able to get it to work properly  I would like to calculate P95 similar to how other functions (average, sum, median, etc) are summarised by group (Dimension) in a single column.
Thanks
Ade

P95 Calc.twbx 23.6 KB


9. Re: Re: Calculation of 95th percentile
Richard Leeke Mar 21, 2014 2:45 AM (in response to Ademola Okuneye)Attached.
I just used the calculation from the reference library then had to do the following:
1) Add Days Open as a dimension on level of detail.
2) Set the partitioning on the percentile function to Days Open.
3) Added a filter on calculated field [First Row] so that only one rows is displayed per Category.

P95 Calc RL.twbx 27.6 KB


10. Re: Re: Calculation of 95th percentile
Ademola Okuneye Mar 21, 2014 4:20 AM (in response to Richard Leeke)Hi Richard,
Thanks so much for this! I'm almost there with getting this to work except on thing.
I seem to be having some problem with the 3rd step of adding a filter on the calculated field [First Row]. My filter is only showing available value of 'True'. Any ideas why?
Currently the columns are displaying all the data as opposed to only one row per Category.
Thanks

11. Re: Re: Calculation of 95th percentile
Richard Leeke Mar 21, 2014 12:03 PM (in response to Ademola Okuneye)Sorry, I should have mentioned that. The partitioning on the [First Row] field on the filter shelf needs to be set the same as it is on the percentile  ie to [Days Open]. That makes the filter take the first row out of each of the partitions used for the percentile calculation  so that you get one row per category. The default partitioning is making each row into a separate partition, so with only one row per partition everything is the first row, which is why the filter only offers a value of true.

12. Re: Re: Calculation of 95th percentile
Anna Sokolowska Nov 1, 2018 9:02 AM (in response to Richard Leeke)Hi Richard,

13. Re: Re: Calculation of 95th percentile
Richard Leeke Nov 1, 2018 2:00 PM (in response to Anna Sokolowska)If you can attach a sample workbook showing what you have done I'll try to take a look  no promises about how quickly though!

14. Re: Re: Calculation of 95th percentile
Matt East Dec 17, 2018 5:13 AM (in response to Richard Leeke)Hi Richard,
I have been following your worked examples (very helpful, thank you!). My problem is slightly different. I want the percentile (90% in my case) to be determined by the value of the measure not the count. In the attached dummy data there are a bunch of Purchase Orders (POs) and i want to have a single cell KPI that says 'what is the value of 90% of POs '. As you can see from tab 'old version' the correct answer should be 9.51. However i want this displayed as a single cell in a dashboard. I have tried to use your formulaes and method in the tab 'new version', with suitable modifications but it is not working.
Would you be able to help with this?
Thanks,
Matt

90P PO example.twbx 47.0 KB
