Forum Discussion
saranee
8 years agoHelper I
Dynamic ranking based on date
Hi all, Request your help on this. We are basically having a table with Name,Date and based on date we are assigning Rank. We have calculated column to calculate rank:RANKX(FILTER(Table1,Tab...
- 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 )
ricardocamargos
8 years agoContinued Contributor
saranee
8 years agoHelper I
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
- ricardocamargos8 years agoContinued Contributor
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!!