web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple IF with condi...
Power Apps
Answered

Multiple IF with conditions?....

(0) ShareShare
ReportReport
Posted on by 4

I have an icon that Changes from an X to a Check if the statement is true or not., depending on date selected from datepicker and if a condition is met from a Collect.

What I would like, is to use the same icon for all 4 quarters depending on what is chosen from the datepicker.

Working statement is below.

If(LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1))

 

Possible to use something like this? I am stumped.

Thanks for any insight!! 😊

 

If(LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),

LookUp(Collect2ndQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),

LookUp(Collect3rdQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),

LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1))

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @comatose1978 

    When you chain multiple If conditions, you are only focused on the true factor, the "else" (false factor) would be the last parameter of your If statement.

    So, your formula would be the following:

    If(
     LookUp(Collect1stQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) && 
     Year(CompletionDate)=Year(DatePicker1.SelectedDate) && 
     Status=5, true ), RGBA(99,139,44,1),
     
    
     LookUp(Collect2ndQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) && 
     Year(CompletionDate)=Year(DatePicker1.SelectedDate) && 
     Status=5, true ), RGBA(99,139,44,1),
    
     LookUp(Collect3rdQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) && 
     Year(CompletionDate)=Year(DatePicker1.SelectedDate) && 
     Status=5, true ), RGBA(99,139,44,1),
    
     LookUp(Collect1stQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) && 
     Year(CompletionDate)=Year(DatePicker1.SelectedDate) && 
     Status=5, true ), RGBA(99,139,44,1),
     
     RGBA(168,0,0,1)
    )

    The syntax is:    IfCondition1ThenResult1 [, Condition2ThenResult2, ... [ , DefaultResult ] ] )

    As it was in your formula, your Condition2 (for example) was an RGBA function.

     

    I hope this is helpful for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard