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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kjartank
Helper II
Helper II

Measure that filters by 10 highest values

I have a table with a column that is used as an identifier. The tables that I make on the two first pages are only supposed to show the 10 highest values from that column, i.e the 10 most recent rows. How would I go about writing a measure that only shows the 10 highest values, so I can put the measure as a pagewide filter?

1 ACCEPTED SOLUTION
TheOckieMofo
Resolver II
Resolver II

You might need to post an example of the data so that we can understand exactly what you are looking for. But I think you're looking to rank members of a table by a measure. For example, you're looking to get the top 10 sales reps by total sales? Is that correct?

 

If so, the easiest way to do this would be to make your table visual in Power BI then look at the "filters" area on the right. Under "Visual Level Filters" there should be the attribute you have in the rows of your table. Hover over this attribute and hit the minus sign. This will display the filter options. From the drop down list, select "Top N" and then under that select the number of items you want to show and the value you want to filter on, usually the same value you are showing in your table.

View solution in original post

5 REPLIES 5
TheOckieMofo
Resolver II
Resolver II

You might need to post an example of the data so that we can understand exactly what you are looking for. But I think you're looking to rank members of a table by a measure. For example, you're looking to get the top 10 sales reps by total sales? Is that correct?

 

If so, the easiest way to do this would be to make your table visual in Power BI then look at the "filters" area on the right. Under "Visual Level Filters" there should be the attribute you have in the rows of your table. Hover over this attribute and hit the minus sign. This will display the filter options. From the drop down list, select "Top N" and then under that select the number of items you want to show and the value you want to filter on, usually the same value you are showing in your table.

@TheOckieMofo

 

Thanks a lot! I have never noticed the Top N before, but it does what I need. Sorry for the inconvenience.

No worries. It's actually a fairly new feature. You can accomplish the same thing with dax, but it takes two measures and is definitely not as straightforward.

CahabaData
Memorable Member
Memorable Member

the community probably needs clarification in your post

 

are these IDs sequential integers such that the correct candidates are MAX to MAX - 10

 

or are these IDs something else....and how is the correct set of 10 logically defined?

www.CahabaData.com

Hi @CahabaData

 

Yes, these IDs are sequential integers so the correct candidates are MAX to MAX -10.

 

I put the column just below here.

 

ID

1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1701
1702
1704
1705
1706
1707
1708
1709
1710
1711
1712
1714

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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