Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

conditional rank

Hello Guys..
i want to calculate the rank of column based on condition 
below is my sample dataset

FWCsat_numCSAT_Denom
2023-3200
2023-3211
2023-3201
2023-3212
2023-3501
2023-3401
2023-3200
2023-3411
2023-3211
2023-3411
2023-3211

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

  • 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])