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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jayjani
Helper I
Helper I

Dynamic Top N Ranking

Hello,

 

I created 2 matrix in my PBI file - rank of customers by revenue and rank of customers by revenue growth (showing only top 30 revenue generating customers).

I did not put any limit on the revenue matrix but placed 30 limit on revenue growth matrix since there were some very small revenue customers that showed wonky growth rates. Now the strange thing is when I put the interaction between 2 matrix on and click on a customer that exists in the revenue table but wasn't part of the original top 30 list on the revenue growth matrix, the selected customer automatically shows up on the revenue growth matrix. Does PBI forcefully bring that customer as part of top 30 list and show it's relevant rank? If that's the case, then it's a great feautre but want to make sure I am telling the correct story.

Illustrating in the example below

Rank of customers by revenue

CustomerRank
A2
B1
C3
D4


Rank of customers by revenue growth (top 3 revenue generating customers only)

CustomerRank
A1
B2
C3

 

Now if I click on customer "D" on the 1st table, Power BI automatically shows rank of D in table 2 as well even though D wasn't part of top 3 customers.

3 REPLIES 3
amitchandak
Super User
Super User

@jayjani , Are you using all or allselected. Try to use all in rank or TOPN

 

 

example

calculate([measure], ,TOPN(3,all(Table[customer]),[measure],DESC), values(Table[customer]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for replying. I used "All". Does that mean, it will show the rank of partner "D" on selecting even if D isn't part of top 3 revenue holders?

Anonymous
Not applicable

Hi @jayjani ,

 

Correct, using All() will remove the filters. Try using ALLSELECTED() instead.

If there is still a problem, it's better to show some sample data to us.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 

 

Best Regards,

Jay

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors