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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
shreyamukkawar
Resolver II
Resolver II

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors