Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am trying to use "Switch" to return values but cannot work out how to used the "Or" funtion within the DAX
Solved! Go to Solution.
In switch statemetns you can include AND critiera like this && and OR criteria like thisYou can include AND criteria OR criteria in your switch statement like this ||.
Response SLA Met =
SWITCH(
TRUE(),
-- Priority = Critical and Respond Time Hrs < 1.5
Incidents[Priority] = "Critical" && (Incidents[Respond Time Hrs] <1.5, "True",
-- Priority = Critical or Respond Time Hrs < 1.5
Incidents[Priority] = "Critical" || (Incidents[Respond Time Hrs] <1.5, "True",
"False"
)
In switch statemetns you can include AND critiera like this && and OR criteria like thisYou can include AND criteria OR criteria in your switch statement like this ||.
Response SLA Met =
SWITCH(
TRUE(),
-- Priority = Critical and Respond Time Hrs < 1.5
Incidents[Priority] = "Critical" && (Incidents[Respond Time Hrs] <1.5, "True",
-- Priority = Critical or Respond Time Hrs < 1.5
Incidents[Priority] = "Critical" || (Incidents[Respond Time Hrs] <1.5, "True",
"False"
)
| User | Count |
|---|---|
| 11 | |
| 8 | |
| 7 | |
| 5 | |
| 5 |