Forum Discussion
yforti13
1 year agoRegular Visitor
HELP dax rankx
Hi guys! I'm trying to sort the top 20 values in my table, but I'm encountering the following scenario: My measure: As you can see below, there are values for past...
- 1 year ago
i didn't understand 😕
Like this?RankingTableCNE180d =VAR _x =RANKX(ALL(d_DemaisConvenios),CALCULATE([m_CNE180],'d_Calendario'[Date] >= DATE(2025, 02, 01),'d_Calendario'[Date] <= DATE(2025, 02, 29)))RETURN_x
pankajnamekar25
Super User
1 year agoHello yforti13 ,
You can try this measure
RankingTableCNE180d =
VAR _x =
RANKX(
...
CALCULATE(
[r_CNE180d],
'd_Calendario'[Date] >= DATE(2025, 02, 01),
'd_Calendario'[Date] <= DATE(2025, 02, 29)
)
)
...
RETURN
SWITCH(TRUE()
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
yforti13
1 year agoRegular Visitor
i didn't understand 😕
Like this?
RankingTableCNE180d =
VAR _x =
RANKX(
ALL(d_DemaisConvenios),
CALCULATE(
[m_CNE180],
'd_Calendario'[Date] >= DATE(2025, 02, 01),
'd_Calendario'[Date] <= DATE(2025, 02, 29)
))
RETURN
_x