cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Digital
Impactful Individual
Impactful Individual

Multiple matches in switch statement evaluate to same result

I've looked in the documentation which lists the general format of a switch statement as follows: 

 

SwitchFormulaMatch1Result1 [, Match2Result2, ... [, DefaultResult ] ] )

 

I want to be able to have multiple matches that produces the same match result

 

SwitchFormulaMatch1Match2, Match3, Result1 [, Match4Result4, ... [, DefaultResult ] ] )

 

Does anyone know if this already possible?

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Digital 
This is already possible by writing an IF statement.  It is not the purpose of SWITCH.

If(
    Condition1=true Or Condition2=true Or Condition3=true, Result1,
    Condition4=true, Result2
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User
Super User

@Digital 
This is already possible by writing an IF statement.  It is not the purpose of SWITCH.

If(
    Condition1=true Or Condition2=true Or Condition3=true, Result1,
    Condition4=true, Result2
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Digital
Impactful Individual
Impactful Individual

Hey @mdevaney ,

 

Thanks for the reply, I know I can do that with an If statement but other languages allow switch using multiple matches evaluating to same result. I suppose it's a nice to have rather than something that is necessary.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,299)