Forum Discussion
Dynamic Rank per Product in Time Period
Infact this one should give the proper results with slicers
RANK =
RANKX (
CALCULATETABLE (
VALUES ( Table1[Product] ),
FILTER (
ALLSELECTED ( Table1 ),
Table1[Time Period] = SELECTEDVALUE ( Table1[Time Period] )
)
),
CALCULATE ( SUM ( Table1[Amt] ) ),
,
DESC,
DENSE
)
Thank you for providing the information but the DAX you provided does not give me the correct result, it always gives rank as 1
- Zubair_Muhammad8 years agoCommunity Champion
- rampsaladi8 years agoFrequent Visitor
yes I can see that but It does not work when I do it but let me try again. I also have another requirement where I need to be able to display the Rank for each time period side by side and I tried to do that by filterting the data for the specific time period but it did not work. Any help is appreciated.
Basically I need to show a side by side comparison of the Product Rank over time period in a specific market
- Zubair_Muhammad8 years agoCommunity Champion
Hi rampsaladi
to show a side by side comparison of the Product Rank over time period in a specific market.....
You can try using this rank MEASURE
RANK_ = RANKX ( ALLSELECTED ( Table1[Product] ), CALCULATE ( SUM ( Table1[Amt] ) ), , DESC, DENSE )