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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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]))

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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