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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
turkiewiczmarta
Regular Visitor

Compare single row to total set's Nth percentile

Hi Everyone 🙂 I'm quite new to Power BI and this community, so hoping someone here will be able to help me out.

 

My usecase is that I have a set with multiple product codes, each of them with 2 calculated metrics - X and Y. I want to know how individual rows (products) perform vs. 80th percentile of the total set in respective metrics. 

 

So, using the example below:

turkiewiczmarta_0-1653658471683.png

I was able to calculate the whole set's 80th percentiles (which differ depending on what I choose on my slicer), for Apparel category they are as follows:

Metric X 80th percentile: 206

Metrix Y 80th percentile: 25%

 

As a result I would like to be able to determine whether a single products falls "above" or "below" the thresholds (percentiles) and consequently clusterise them respectively. For instance, if a product is above total set's X 80th percentile and above total set's Y 80th percentile, I want to call it a "Star" (as it's among top 20% values in both metrics). And similarly for the 3 other options (above X + below Y, below X + above Y, below X + below Y).

 

These have to be calculated dynamically according to slicers I apply, as the benchmarks will differ between categories (Apparel, Footwear, Hardware), and I always want to grasp top 20% values in the setup I choose. 

 

Is that something I can do in Power BI? 

Thank you in advance for your support!

 

2 ACCEPTED SOLUTIONS
sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

I think it is possible. I have created a mockup report, pbix, based on the information you posted. It involves a separate product division dimension and filtering by measure. Since you have not shared any data or sample report, the solution I have created in the file might not be directly applicable for your scenario.

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

How to Get Your Question Answered Quickly 

View solution in original post

v-stephen-msft
Community Support
Community Support

Hi @turkiewiczmarta ,

 

Yes, you can compare the Nth percentile to the current row.

You can try to use the ALL function. It returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.

This measure allows all rows to return the value with index column 2.

Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Index]=2))

vstephenmsft_1-1654067851810.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @turkiewiczmarta ,

 

Yes, you can compare the Nth percentile to the current row.

You can try to use the ALL function. It returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.

This measure allows all rows to return the value with index column 2.

Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Index]=2))

vstephenmsft_1-1654067851810.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

sturlaws
Resident Rockstar
Resident Rockstar

Hi,

 

I think it is possible. I have created a mockup report, pbix, based on the information you posted. It involves a separate product division dimension and filtering by measure. Since you have not shared any data or sample report, the solution I have created in the file might not be directly applicable for your scenario.

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

How to Get Your Question Answered Quickly 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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