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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ohohbudi
Frequent Visitor

RANKX with Slicers

Hi guys, am a newbie Power BI user here. I want to ask how to make a filter for Rank? 

I have total items per store report, so i want to make a slicer for rank for top 10 stores, top 20 stores, top 30 etc. I already made the new measures to count the total item per store like this :

 

items = SUMX(FactPenjualan, IF(FactPenjualan[dt_item_price] <> 0, FactPenjualan[dt_item_quantity], 0))

so, for the best 10 store, i already made a measure like this : BranchRank = RANKX(ALL(factpenjualan[store_name]),CALCULATE([items]))

But i use that "BranchRank" function only in visual levels filtering function, which i made less than 11. 

So, how i could make that function so i can have filter for top 10/20/30/etc based on that function? Thanks 

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @ohohbudi,

 

In your scenario, you can follow this article to achieve your requirement: Dynamic TopN & Ranking in Power BI.

 

Also you can use "Top N" filter type. You can place the measure "items" in By Value property, and set different Top N filters. For more information, please refer to this article: Top N filter.

 

q6.PNG

 

Best Regards,

Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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