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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,642)