Forum Discussion

Camstr's avatar
Camstr
Helper I
2 years ago
Solved

Multiple IF Statements

Hello,

I need to create a calculated column based on test results.  I believe I need multiple IF/AND type logical functions to create my DAX expression, but I cannot write this properly.  An example of the data is below, with the calculated column furthest right.

There are two types of test, Manual and Automated.

For a manual test, Result 1 

  • Operates = Pass
  • Partial = Warning
  • Stuck = Fail

For an automated test Result 1 must = Operates

  • Result 2 <40 = Pass,
  • 40-50 = Warning,
  • >50 = Fail

I appreciate some help generating the DAX for this.

Thank you

  • Here is your Solution with Switch function instead of using multiple If statement.

     

2 Replies