Forum Discussion
Anonymous
3 years agoNot applicable
conditional rank
Hello Guys..
i want to calculate the rank of column based on condition
below is my sample dataset
| FW | Csat_num | CSAT_Denom |
| 2023-32 | 0 | 0 |
| 2023-32 | 1 | 1 |
| 2023-32 | 0 | 1 |
| 2023-32 | 1 | 2 |
| 2023-35 | 0 | 1 |
| 2023-34 | 0 | 1 |
| 2023-32 | 0 | 0 |
| 2023-34 | 1 | 1 |
| 2023-32 | 1 | 1 |
| 2023-34 | 1 | 1 |
| 2023-32 | 1 | 1 |
expected result is
1.CSAT=if(count(fw)<5,"",csat_num/csat_denom)
2.Rank of CSAT
how to implement this using DAX
Please help
Thanks
Pradnya
Hi Anonymous ,
Try to add the following two metrics:
CSAT = IF(COUNTROWS('Table (2)') > 5,DIVIDE( SUM('Table (2)'[Csat_num]) , SUM('Table (2)'[CSAT_Denom]))) Ranking = RANKX(SUMMARIZE(ALLSELECTED('Table (2)'), 'Table (2)'[FW], " @CSAT", [CSAT]),[ @CSAT],[CSAT])
2 Replies
- MFelixSuper User
Hi Anonymous ,
Try to add the following two metrics:
CSAT = IF(COUNTROWS('Table (2)') > 5,DIVIDE( SUM('Table (2)'[Csat_num]) , SUM('Table (2)'[CSAT_Denom]))) Ranking = RANKX(SUMMARIZE(ALLSELECTED('Table (2)'), 'Table (2)'[FW], " @CSAT", [CSAT]),[ @CSAT],[CSAT]) - JoaoMarcelinoResponsive Resident
Very cool solution, MFelix
Always thinking ahead of your time 🙂