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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
lcfaria
Helper II
Helper II

Calculating percentiles for comparison from a slicer

Hello everyone,

 

I need help with percentile calculations.

 

I want to compare in which percentile a specific location is in relation to others selected from a slicer.

 

For example, I want to compare in which percentile the value for Location 99999 is when compared to Locations 5 and 88 (selected from a slicer). I also filtered only Position 14.
The result I am expecting is this:

lcfaria_1-1700915644486.png

Location 88 is in the 100th percentile, as there are no values greater than it.
Location 5 is in the 67th percentile, as only 33% of the values are higher than it.
And Location 99999 is in the 33th percentile, as it is lower than 67% of the values.

 

I tried creating a measure to calculate this, but I'm having trouble ranking the values, as I can't reach the column created in my variable table:

lcfaria_2-1700915707687.png

Also I don't know whether it would be the best way to do this or not.

 

Can anyone help me, please?

 

I am attaching the pbix file, in case it helps.

Sample_Percentile.pbix

 

Thank you very much!

2 REPLIES 2
ThxAlot
Super User
Super User

ThxAlot_0-1700943350488.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



Hi @ThxAlot thank you very much for your answer! I had to adjust a few things for my real model, but it worked 🙂

 

However, I would like to always show the percentiles for Location 99999 even if it is not selected in the slicer.

For example: I removed the selection of Location 99999 and kept only the Positions in the table. The result I expect to see here is 0.33333.

lcfaria_1-1701018414278.png

 

I spent the day trying different ways to do it, but I haven't succeeded yet.

Do you think it's possible to do this?

 

Percentile.pbix

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors