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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

using DAX to Grade Percentages

Hi

 

I am scoring data quality of some product data. based on percentage differences between actual data and what the supplier has given me. in excel I would use the IFS function 

=IFS(D21<0.9,"F",D21<=1,"A",D21<=0.96,"B",D21<=0.93,"C")

 

How can I do this in DAX.

Thx in advance

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

As per my understanding, I have tried to answer your question.

 

shreyamukkawar_0-1674048556016.png

Flag = IF(Sheet1[Difference]<0.9,"F",IF(Sheet1[Difference]<=1,"A",IF(Sheet1[Difference]<=0.96,"B",IF(Sheet1[Difference]<=0.93,"C"))))
 

Best Regards,
Shreya

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

Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

I managed to sort it using SWITCH(TRUE().

Grades: = SWITCH(TRUE(),'VELU001_Weights_Graded'[VELU001_Audited_Weight_Difference]<=0.04,"A",'VELU001_Weights_Graded'[VELU001_Audited_Weight_Difference]<=0.07,"B",'VELU001_Weights_Graded'[VELU001_Audited_Weight_Difference]<=0.1,"C",'VELU001_Weights_Graded'[VELU001_Audited_Weight_Difference]>0.1,"Fail")
Thanks for your swift reply and help
😊

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.