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
Ani26
Helper III
Helper III

RANKX function using multiple dimensions

Hi Team,

I need to show rank based on a measure named [CF $B].

I am using a table visual and I pull fields into the table from 3 different dimension tables.
Below is the table visual where Fund name, Provider, Listed region columns are from different dimension tables. AUM and CF are the measures based on the Fact table.

Ani26_0-1614616871869.png

I have used the below formula to derive the ranking

TF_Rank = 
rankx(crossjoin(allselected('Fund'[Fund Name]),allselected('Provider'[Provider]),ALLSELECTED('Region'[Listed Region])),[CF $B])

and I get the ranking as well from 1 onwards. But I need to show only top 10. Hence as soon as I apply filter to show only top 10 values, the ranking changes as below which was 1,2,3....10....so on... before

Ani26_1-1614617295480.png

How do I get only the top 10 ranks using the above measure or do i need to apply any explicit filter condition.

 

Thanks.

Ani

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Ani26 ,

 

You need to do a "merge" between the RANK and the TOPN.

 

Check this post https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/

 And check the alternative approach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Ani26 ,

 

You need to do a "merge" between the RANK and the TOPN.

 

Check this post https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/

 And check the alternative approach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.