cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aharsh
Helper II
Helper II

Can't get my IF AND statement working

Hi All,

 

My eyes are blurry from staring at this line of code.  I am trying to make an image visible only if there are no attachments and the value of a field matches.  Each of these statements works on their own. I can't get the AND part right.  Here's my latest attempt:

 

 

If(And(IsEmpty(ThisItem.Attachments), If('Type of Dish'.Value = "Main Entree",false,true)))

 

 

Any thoughts? 

1 ACCEPTED SOLUTION

Accepted Solutions
leyburn19
Memorable Member
Memorable Member

Yo have not closed the And, and the second IF may not be required

Try

 

If(And(IsEmpty(ThisItem.Attachments),'Type of Dish'.Value = "Main Entree"),false,true)

View solution in original post

2 REPLIES 2
leyburn19
Memorable Member
Memorable Member

Yo have not closed the And, and the second IF may not be required

Try

 

If(And(IsEmpty(ThisItem.Attachments),'Type of Dish'.Value = "Main Entree"),false,true)

View solution in original post

Hi @leyburn19 

 

Thank you! I thought I'd tried every combination - but yours worked!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,106)