Forum Discussion
JamesBurke
2 years agoHelper III
Rank x
Hi , I'm struggling with a rankx Dax calculation that would rank all deivces assoicated with a specific stores name , Imagine i have 30 stores with hundreds of devices But i only want to ra...
Greg_Deckler
2 years agoCommunity Champion
JamesBurke So like this?
Rank = RANKX( FILTER( ALL('Table'), LEFT([Device],2) = "KP" ), CALCULATE(SUM([Usages])),, DESC )JamesBurke
2 years agoHelper III
Rank =
RANKX(
FILTER( ALL('Emporia Devices'),
LEFT('Emporia Devices'[Device Name],2) = "KP" ),
CALCULATE(SUM('Emporia Device Usage'[Usages KWH])),, DESC )
This does not filter the device names to only rank KP Stores, it ranks all and not by Usages for some reason.
- Greg_Deckler2 years agoCommunity Champion
JamesBurke How about this?
Rank = IF( LEFT('Emporia Devices'[Device Name],2) = "KP", RANKX( FILTER( ALL('Emporia Devices'), LEFT('Emporia Devices'[Device Name],2) = "KP" ), CALCULATE(SUM('Emporia Device Usage'[Usages KWH])),, DESC ), BLANK() )- JamesBurke2 years agoHelper IIICALCULATE(RANKX(ALL('Emporia Devices'[Device name KP]), // NOT ALLSELECTED[Total Kwh]))I've made conditonal column and use the above Measure , is there a simple way to not include blanks in the rankings ?thanks !