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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Issue with Rankx Feature

I m using Rankx feature for getting to display top N Products for multiple selections across platforms. The function works fine for single selectionn but return multiple products from each category if choosen. How do I put it to select the Top  N from multiple Categories as well. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

You can write a measure with a variable to summary table records and add a custom field for the ranking, then you can extract the rank number from the slicer to filter on the variable table and get the matched record id list. Then you can use this to compare with the current row context id to return the tag.

How to Summarize and Rank the Data based on Count in Power BI | Power BI Kingdom | Blog (excelkingdom.blogspot.com)
After these steps, you can use this measure on your visual level filter to enable filter effects.
Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

You can write a measure with a variable to summary table records and add a custom field for the ranking, then you can extract the rank number from the slicer to filter on the variable table and get the matched record id list. Then you can use this to compare with the current row context id to return the tag.

How to Summarize and Rank the Data based on Count in Power BI | Power BI Kingdom | Blog (excelkingdom.blogspot.com)
After these steps, you can use this measure on your visual level filter to enable filter effects.
Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.