Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |