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
sprakash1192
Helper II
Helper II

Dynamic Ranking

Hello All,

I have a dynamic problem to solve where I would like to rank my data dynamically on different measures and dimensions using slicers.

I have daily sales data which looks like this:

 

CustomerRegionDateCostSalesInvOH
ADFW2/13/2021428218
BAUS2/13/20217217414
CTYL2/13/2021927423
DWAX2/13/2021855127
EHOU2/13/20214110411
FLOS2/13/20217612923
GSCHL2/13/2021227514
HNSF2/13/20212017020
IDFW2/13/20211916127
JAUS2/13/20214813912
KTYL2/13/20219112817
LWAX2/13/20214415920
MHOU2/13/20211005316
NLOS2/13/20213015719
OSCHL2/13/20211815824
PNSF2/13/2021569022
QDFW2/13/20213719022
RAUS2/13/20211014524
STYL2/13/20217816922
TWAX2/13/20217217314
UHOU2/13/20215511817
VLOS2/13/20219015117
WSCHL2/13/2021388011
XNSF2/13/2021488715
YDFW2/13/2021448217
ZAUS2/13/20212915216

 

I want to dynamically rank my stores or my region by total sales or total cost or total InvOH. I want to have slicer where I can select my dimension - stores / region and then select rack by sales / cost / Inv OH and my rank table displays data based on my selection.

 

How do I achieve that? Please let me know if this does not make sense.

1 ACCEPTED SOLUTION
jameszhang0805
Resolver IV
Resolver IV

Just one kind of solution, create an independent table and then create a dynamic measure by switch function.

jameszhang0805_0-1613790960256.png

jameszhang0805_1-1613790984182.png

Testing.gif

Dynamic Ranking.pbix 

View solution in original post

5 REPLIES 5
jameszhang0805
Resolver IV
Resolver IV

Just one kind of solution, create an independent table and then create a dynamic measure by switch function.

jameszhang0805_0-1613790960256.png

jameszhang0805_1-1613790984182.png

Testing.gif

Dynamic Ranking.pbix 

Hi @jameszhang0805 ,

 

Sorry, the statement you shared is overdue.

I have the same question, how do you create a Rank calculation column or metric?

Anonymous
Not applicable

how you create the rank calculation?

stevedep
Memorable Member
Memorable Member

Hi,

You could unpivot and work with a rank formula that works with allselected. Please see below and attached. 

Hope it helps.

Kind regards, Steve. 

4701773E-8F24-4E7A-9F5A-FEDF9418A3F1.GIF

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.