Dynamic RANKX using parameters

Hi everyone!

I’m struggling to create a dynamic ranking based on 2 different parameters: 1 parameter is the dimension I want to slice onto dimension which includes products, customers and cities AND the other parameter is the unit of economics including Net Sales, Units, Orders and Profit.

image
image

This is the code I came up with which isn’t working:
Rank 2 =
RANKX(
ALLSELECTED( ‘Dimension’[Dimension Fields] ) ,
SELECTEDVALUE( ‘Unit of Economics’[Unit of Economics] ), , DESC )

Any light you could shed here would be highly appreciated.

Thanks a lot,
Samuel
MyWorkingsShared.pbix (923.3 KB)

Hi @SamSPAIN ,

Welcome back.

You got a problem that Marco Russo described in his article:

So you need to make some workarounds
MyWorkingsShared_workaround.pbix (922.3 KB)

Hope it helps.

Good luck.

1 Like

Thanks a lot @mspanic!! your workaround truly meets what I was after :slight_smile:

1 Like