Forum Discussion
Anonymous
8 years agoNot applicable
Ranking based on condition
Is it possible to rank based on conditions? For example I have list of tickets with Assigned to. If Assigned to is not blank only then the Rank should be assigned based on Ticketnumber (string).
| TicketNumber | Assigned To | Rank |
| ABC1 | Joe | 1 |
| BCD2 | John | 2 |
| CDE3 | ||
| DEF4 | Stacy | 3 |
| EFG5 |
Hi Anonymous,
Please create a calculated column using below formula:
Rank = IF ( Table1[Assigned To] = BLANK (), BLANK (), RANKX ( FILTER ( Table1, Table1[Assigned To] <> BLANK () ), VALUE ( RIGHT ( Table1[TicketNumber], 1 ) ), , ASC, DENSE ) )
Best regards,
Yuliana Gu
3 Replies
- Zubair_MuhammadCommunity Champion
Hi Shanka,
Try this
=If(ISBLANK(Table1[Assigned To]),
BLANK(),
calculate(COUNTrows(Table1),
filter(Table1,Table1[TicketNumber]<=earlier(Table1[TicketNumber])&&NOT(ISBLANK(Table1[Assigned To])))
)
)
- v-yulgu-msftMicrosoft Employee
Hi Anonymous,
Please create a calculated column using below formula:
Rank = IF ( Table1[Assigned To] = BLANK (), BLANK (), RANKX ( FILTER ( Table1, Table1[Assigned To] <> BLANK () ), VALUE ( RIGHT ( Table1[TicketNumber], 1 ) ), , ASC, DENSE ) )
Best regards,
Yuliana Gu - Ashish_MathurSuper User
Hi,
Do you want that as a calculated column or as a measure?