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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Conditional formatting

I am trying to use "Switch" to return values but cannot work out how to used the "Or" funtion within the DAX

 

Response SLA Met =
SWITCH(
TRUE(),
Incidents[Priority] = "Critical", AND (Incidents[Respond Time Hrs] <1.5, "True"
))
 
Works as expected BUT i also need to use Or to complete the required outcome
 
Incidents[Priority] = "High", AND (Incidents[Respond Time Hrs] <3.0, "True"
 
Any advise would be appreciated
 
Gary Gray
1 ACCEPTED SOLUTION
jennratten
Super User
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"
)

View solution in original post

1 REPLY 1
jennratten
Super User
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"
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors