Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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"
)
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
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"
)
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User