Forum Discussion
Dynamic ranking based on date
- 8 years ago
Try this MEASURE for dynamic RANKING
RANK = RANKX ( FILTER ( ALLSELECTED ( Table1 ), Table1[Name] = SELECTEDVALUE ( Table1[Name] ) ), CALCULATE ( SELECTEDVALUE ( Table1[Date] ) ), , DESC, DENSE )
HI Richard,
We will be then unable to use EARLIER in measure.Please can you suggest some alternative as we want seperate set of names and then trying to find rank.
Thanks,
saranee
Hi saranee,
Try this code:
_Index =
IF(ISBLANK(CALCULATE(COUNTROWS(Table2); FILTER(ALLSELECTED(Table2[Date]); Table2[Date] < MAX(Table2[Date]))));
1;
CALCULATE(COUNTROWS(Table2); FILTER(ALLEXCEPT(Table2; Table2[Name]); Table2[Date] < MAX(Table2[Date]))) + 1)
Ricardo
- Zubair_Muhammad8 years agoCommunity Champion
Try this MEASURE for dynamic RANKING
RANK = RANKX ( FILTER ( ALLSELECTED ( Table1 ), Table1[Name] = SELECTEDVALUE ( Table1[Name] ) ), CALCULATE ( SELECTEDVALUE ( Table1[Date] ) ), , DESC, DENSE )- rishikdutta19878 years agoRegular Visitor
Zubair_Muhammad Thats the correct solution!!
- v-huizhn-msft8 years agoMicrosoft Employee
Hi rishikdutta1987,
Please mark the right solution as answer, so more people like you can find the solution easily.
Best Regards,
Angelia
- Anonymous7 years agoNot applicable
Zubair_Muhammad Thanks for the solution, it worked seamlessly.
- Anonymous4 years agoNot applicable
Kudos on this solution