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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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?

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.