Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CPage-WF
Regular Visitor

90th Percentile Issues (Not displaying correctly)

I am having issues with capturing the 90th percentile of a given set of data.  I have used all the percentile forumals below with no luck.  While it returns results, they seem to be incorrect.

 

  • PERCENTILE.EXC('Public-Dashboard'[Unit Turnout Time],0.9)
  • PERCENTILE.INC('Public-Dashboard'[Unit Turnout Time],0.9)
  • PERCENTILEX.EXC('Public-Dashboard',[Unit Turnout Time]0.9)
  • PERCENTILEX.INC('Public-Dashboard',[Unit Turnout Time],0.9)

Below is a certain set of data where you can see the results of the forumla are returning incorrect results as I did the calculation manually on paper.  As you know a normal 90th percentile formula would be calculated as the following steps.

 

  1. Put data in chronological order
  2. Count how many data points you have (in the example below it would be 23)
  3. Take 23 * 0.9 which returns 20.7
  4. Your 90th percent would be the 21st number or 20th number.

Based on the images below I would assume it would be 110 or 118.

 

CPageWF_0-1707319479626.pngCPageWF_1-1707319492632.png

 

1 ACCEPTED SOLUTION
WinterMist
Impactful Individual
Impactful Individual

@CPage-WF 

 

Yes.  If you do not already have an Index, you can create a Calculated Column as follows.

 

NOTE: I am assuming you have an ID in your table.  Since you have duplicate values in the Unit Turnout Time, you need a way to differentiate between duplicates to assign different ranks for the same Unit Turnout Time.  In this example, I'm simply adding the ID to the Unit Turnout Time to get a unique value on which to properly rank all values.

 

WinterMist_0-1707327931446.png

 

 

Once your Index column exists, just update the measure to refer to it inside the CALCULATE.

 

WinterMist_1-1707328303544.png

 

Hope this makes sense.

Nathan

View solution in original post

8 REPLIES 8
WinterMist
Impactful Individual
Impactful Individual

@CPage-WF 

 

Yeah, I'm out of ideas unfortunately.

 

A solid data source should have a unique ID column in each table in the model.

Without a unique ID, we have no way of ranking the Unit Turnout Time due to duplicate values.

And without being able to rank the values, how can Power BI be able to identify the Nth value in the list (in this case the 21st)?  It cannot.

 

Perhaps someone else in the community knows of a different route to take?

 

I am sorry I was not able to provide a solution.

 

Regards,

Nathan

 

 

@WinterMist 

 

Don't be sorry, you helped tremendously.  I will work on seeing if I can get a unique ID to drop in with the data.

WinterMist
Impactful Individual
Impactful Individual

@CPage-WF 

 

Yes.  If you do not already have an Index, you can create a Calculated Column as follows.

 

NOTE: I am assuming you have an ID in your table.  Since you have duplicate values in the Unit Turnout Time, you need a way to differentiate between duplicates to assign different ranks for the same Unit Turnout Time.  In this example, I'm simply adding the ID to the Unit Turnout Time to get a unique value on which to properly rank all values.

 

WinterMist_0-1707327931446.png

 

 

Once your Index column exists, just update the measure to refer to it inside the CALCULATE.

 

WinterMist_1-1707328303544.png

 

Hope this makes sense.

Nathan

@WinterMist - I am not sure if what I am trying accomplish is going to work or either i'm losing faith.  I don't have any sort of ID in the table either.  Here is a quick snipit of the actual table and the sepcific data in said table.

CPageWF_0-1707328786553.pngCPageWF_1-1707328827290.png

 

So for example, each unit has its own turnout time for each specific incident.  I am wanting to take the turnout time for said unit and display it in th e 90th percentile accounting for specific slicer filters (that is another conversation). 

 

CPageWF_2-1707328969960.png

 

CPage-WF
Regular Visitor

@WinterMist - I attempted to use the formula you added above, it returned no value under 90th Percentile.

CPageWF_1-1707324053973.png

 

 

WinterMist
Impactful Individual
Impactful Individual

@CPage-WF 

 

That is because of the highlighted line in your measure below.

The CALCULATE is asking for the Unit Turnout Time where Unit Turnout Time = 21.

But there is no value in Unit Turnout Time of 21.  So it returns nothing.

 

 

WinterMist_0-1707324875593.png

 

 

Instead, you want to get the Unit Turnout Time for the 21st record in the list.

This is why I used an Index / Linenumber column, that simply tells you what the linenumber is.

The highlighted line in the measure below is asking for the Unit Turnout Time WHERE Index (i.e. Linenumber) = 21.  In this case, Index 21 exists, and is able to find the result.

 

WinterMist_1-1707325740297.png

 

Does this make sense?

@WinterMist - Yes it makes perfect sense so my question is how can I take the following data and 'select' the right number? Do I need to add an index colum so each turnout time has a specific index number to go with? Ultimately I would like like for it to display the number selected vs showing the entire list of turnout times.

I am open to communicate elsewhere if we need to.

 

CPageWF_0-1707326426570.png

 

WinterMist
Impactful Individual
Impactful Individual

@CPage-WF 

 

Please try the following.

 

Regards,

Nathan

 

WinterMist_0-1707323395095.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.