Incorrect percentile when compared to tableau

Hi, I have got 90 percentile calculating the date diff of 2 dates but the percentile is not matching with the tableau’s and when I am selecting show total of row option that is not giving me the correct percentile of 3 rows, can someone please help?

Hi @Nisha - Welcome to AWS QuickSight and thanks for posting the question. Can you please share sample data and give a screenshot of QuickSight Vs Tableau results. This will help community members to help you on this.

Regards - Sanjeeb

Hi @Sanjeeb2022
Uploading: Tableau.jpg…
Uploading: Quicksight.jpg…
I have attached the sample data of tableau as well as quicksight for the reference.
percentile from quicksight

calculated field used for quicksight - Datediff ({date_column1},{date_column2},‘DD’)
calculated field used for tableau - Datediff(‘day’,DATE(date_column1),date(date_column2))

But both are not giving me the same result for weekly and having 1 more problem as the tableau numbers are in float (17.2),getting round off in quicksight,how to fix it i want exact numbers as tableau.
When I am trying to get the 90 percentile of wk 16 of quicksight as per the excel(attached) it should give me 12.6 but its giving me 11 (selecting show row total option).

Hi @Nisha - You can cast the field as float in QuickSight. See one reference for the same.

Regards - Sanjeeb

Hi @Sanjeeb2022 the solution didn’t worked. I have tried instead of converting into days have converted into hours and then dividing it with 24, have seen in some post that also didn’t worked. I can see in tableau there are only 4 rows(with the date columns) considered for a particular row while calculating but in quicksight i am having 80 rows.Why its like that and how to fix it ?

Hi @Nisha - Can you please give sample data and expected output in QS. This will help me replicate the issue at my end and check it.

Regards - Sanjeeb

Shipment_id Percentile
PXXXXXXX01 16
PXXXXXXX02 13
PXXXXXXX03 11
PXXXXXXX04 11
PXXXXXXX05 11
PXXXXXXX06 11
PXXXXXXX07 11
PXXXXXXX08 11
PXXXXXXX09 11
PXXXXXXX10 11
PXXXXXXX11 11
PXXXXXXX12 11
PXXXXXXX13 14
PXXXXXXX14 10
PXXXXXXX15 10
PXXXXXXX16 9
PXXXXXXX17 9
PXXXXXXX18 9
PXXXXXXX19 10
PXXXXXXX20 9
PXXXXXXX21 10
PXXXXXXX22 9
PXXXXXXX23 10
PXXXXXXX24 10
PXXXXXXX25 10
PXXXXXXX26 10
PXXXXXXX27 10
PXXXXXXX28 20
PXXXXXXX29 8
PXXXXXXX30 10
PXXXXXXX31 9
PXXXXXXX32 18
PXXXXXXX33 8
PXXXXXXX34 14
PXXXXXXX35 9
PXXXXXXX36 14
PXXXXXXX37 9
PXXXXXXX38 9
PXXXXXXX39 9
PXXXXXXX40 8
PXXXXXXX41 13
PXXXXXXX42 0
PXXXXXXX43 11
PXXXXXXX44 16
PXXXXXXX45 11
PXXXXXXX46 9
PXXXXXXX47 9
PXXXXXXX48 9
PXXXXXXX49 1
PXXXXXXX50 9
PXXXXXXX51 9
PXXXXXXX52 9
PXXXXXXX53 9
PXXXXXXX54 9
PXXXXXXX55 1
PXXXXXXX56 7
PXXXXXXX57 9
PXXXXXXX58 8
PXXXXXXX59 13
PXXXXXXX60 7
PXXXXXXX61 8
PXXXXXXX62 8
PXXXXXXX63 8
PXXXXXXX64 9
PXXXXXXX65 9
PXXXXXXX66 14
PXXXXXXX67 8
PXXXXXXX68 8
PXXXXXXX69 7
PXXXXXXX70 9
PXXXXXXX71 9
PXXXXXXX72 8
PXXXXXXX73 9
PXXXXXXX74 8
PXXXXXXX75 8
PXXXXXXX76 8
PXXXXXXX77 7
PXXXXXXX78 8
PXXXXXXX79 9
PXXXXXXX80 8

Hi @Sanjeeb2022 90 percentile for above will be 13.1 (this is the data for quicksight)

In tableau

Shipment_id Percentile
PXXXXXXX01 20
PXXXXXXX02 18
PXXXXXXX03 16
PXXXXXXX04 1

the percentile is 19.4

I want my percentile of quicksight to match with tableau’s 19.4

Hi @Nisha - I took the data for QuickSight and calculate the 90th Percentile ( use the function - percentileCont) and it gave me the value as 13.1 which is also matching with excel data. There is no issue with QuickSight. Can you please check for these data, how come Tableau providing other value.

See the excel result here

QuickSight result

Regards - Sanjeeb

Hi @Nisha, did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!