cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lauren_
Helper V
Helper V

Multiple IF statement

Hey folks, I'm having a blank on the following If statement. How can I put multiple 'true' statements into a single function? 

 

E.g. (this doesn't work but an idea of what I'm trying to do!)

 

If(Retain_1.Selected.Value="3 months",DataCardValue72.SelectedDate+90
Or If(Retain_1.Selected.Value="6 months",DataCardValue72.SelectedDate+180
Or If(Retain_1.Selected.Value="12 months",DataCardValue72.SelectedDate+365
Or If(Retain_1.Selected.Value="18 months",DataCardValue72.SelectedDate+3547,""))))

1 ACCEPTED SOLUTION

Accepted Solutions
zmansuri
Super User
Super User

Switch((Retain_1.Selected.Value,"3 months",DataCardValue72.SelectedDate+90,"6 months",DataCardValue72.SelectedDate+180,"12 months",DataCardValue72.SelectedDate+365,"18 months",DataCardValue72.SelectedDate+3547,Blank())

View solution in original post

6 REPLIES 6
zmansuri
Super User
Super User

Switch((Retain_1.Selected.Value,"3 months",DataCardValue72.SelectedDate+90,"6 months",DataCardValue72.SelectedDate+180,"12 months",DataCardValue72.SelectedDate+365,"18 months",DataCardValue72.SelectedDate+3547,Blank())

Perfect, thank you so much!!

Glad it worked

Hi Zmansuri, one more switching question for you please!

 

If I have a Radio and I want to set up a switch statement for the two radio options, based on whether or not two fields are filled in (it's one or the other), how do I get this to work?

 

Switch(Radio1.Selected.Value,!IsBlank(Gallery2.Selected.DisposalDate),"Disposed",!IsBlank(Gallery2.Selected.MTSMoveDate),"Move to MTS",""))

^this is what I'm trying but its not coming out right.

Haven't work with radio button yet. But your code seems to be missing first value:

 

Switch(Radio1.Selected.Value,"Value",!IsBlank(Gallery2.Selected.DisposalDate),"Disposed",!IsBlank(Gallery2.Selected.MTSMoveDate),"Move to MTS",""))

Hmm that's not quite right - thank you though Zmansuri, I'll keep at it trying to get my head around it! 🙂 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,611)