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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.