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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Rameshwar
Frequent Visitor

Top N Filter Issues

There seems to be a problem in the filter behavior "TOP N" when the report already has other filters.

 

For example, I want to show the 10 players with the best performance, but had a filter for matches > 5. When you apply the "TOP 10" filter, are returned only 3 players, because the filter "TOP N" filters the original data, and not the data already filtered by the "greater than 5 matches."

 

I believe the expected behavior for my problem should be - the filter "TOP N" respect other filters applied. That is, the TOP N should be the last filter applied, not the first.

 

Thanks,

Rameshwar

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Rameshwar,

 

In addition, here is a similar idea shared on Power BI Ideas forum. You can vote it up and add your comments there to improve Power BI on this feature. Smiley Happy

 

Regards

CahabaData
Memorable Member
Memorable Member

It is all about the filter context.  One needs to build a Top N measure, rather than rely on the visual filter - and then that measure will work within the visual filter context.

 

I recommend a YouTube video by Sam McKay - look for Enterprise DNA N. Zealand: 

Video: Create Dynamic Visuals based on Ranking

Context sensitive ranking - this example is about customers and profit but should be applicable in your case:

Customer Rank = RANKX( ALL ( Customer ), [Total Profits], , DESC )

  • - you need the ALL otherwise rank will always be #1, since rankX is an iterator

 

Then make measure

Top 10 = IF ( [Customer Rank] <= 10, [Total Profits], BLANK () )

www.CahabaData.com

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.