Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION
MFelix
Super User
Super 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])

 

MFelix_0-1669282378004.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
JoaoMarcelino
Responsive Resident
Responsive Resident

Very cool solution, @MFelix 
Always thinking ahead of your time 🙂

MFelix
Super User
Super 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])

 

MFelix_0-1669282378004.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.