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
meconnolly95
Regular Visitor

Filtering # of rows by the result of a measure

I have a data set that I am trying to show top 20%, Middle 60%, and Bottom 20% of a count of # of clients. 

 

I created a measure that returns the top or bottom 20%, by doing a distinctcount(Client Name)*.20. For example - if someone has a client count of 134, I would want the table to show the top 27 accounts by revenue size. But the total client count is always changing, so need it to be dynamic on the count, so I cant use the Top N function.

 

How do I filter the table down to show the result of that measure? Open to other suggestions as well.

 

Thanks!

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @meconnolly95 ,

 

I recommend PERCENTILE.INC(<column>, <k>).

You can create a measure like the following,

80%measure =
IF( table[value] > PERCENTILE.INC( table[value], 0.8 ), 1, BLANK() )

 

Then add the 80%measure in the Filters and set it items is 1 to filter the result you want.

 

Best Regards

Community Support Team _ chenwu zhu

 

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-chenwuz-msft
Community Support
Community Support

Hi @meconnolly95 ,

 

I recommend PERCENTILE.INC(<column>, <k>).

You can create a measure like the following,

80%measure =
IF( table[value] > PERCENTILE.INC( table[value], 0.8 ), 1, BLANK() )

 

Then add the 80%measure in the Filters and set it items is 1 to filter the result you want.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

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.