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
melvincv
Frequent Visitor

Calculate ranks dynamically based on Slicer selection.

I have a table with the columns:

Customer No.

Revenue

Product Line

- Class

-- Item

Country

State

City

 

There is a product hierarchy like this - Product Line > Class > Item

I need to display the list of the top n customers by revenue.

If we select any particular product in the slicer, it should show the top n customers in that product category.

Similarly, for the country, state and city.

We are using a slicer for the no. of top customers - the n value.

Right now, we are trying to do this using RANKX and Index column, but it is not working as expected.

 

Eg:

We enter 100 in the n value slicer

If we select any product in the hierarchy, it should show the top 100 customers in that category.

It could be a product line / class / item. Or even a Country, State or City.

 

As of now, we are able to get the top 100 customers using Index and Rank. But while we try to apply the slicers, it filters the customers that are falling under that category from the top 100 selected earlier.

 

Please help us at the earliest...

 

 

0 REPLIES 0

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.