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

Community site session details

Session Id : 556VSvhInDwhvYGs+m5VWE
Power Apps - Building Power Apps
Answered

Do If statements with Filters always need that second Filter to show information?

Like (0) ShareShare
ReportReport
Posted on 16 Nov 2022 20:08:45 by 577 Super User 2024 Season 1

Hard to a describe so here is the Code:

 

If(
 IsBlank(First(Filter(Source, ID = ThisItem.ID)).Value),
 "",
 First(Filter(Source, ID = ThisItem.ID)).Value
)

 

Do I really need to use the Filter twice or am I missing something?

 

Thank you

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 18 Nov 2022 at 14:05:53
  • KRider Profile Picture
    577 Super User 2024 Season 1 on 18 Nov 2022 at 13:12:41
    Re: Do If statements with Filters always need that second Filter to show information?

    LookUp takes a bit more resource than Filter no?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 16 Nov 2022 at 20:44:40
    Re: Do If statements with Filters always need that second Filter to show information?

    @RonLar 

    Mine is even more concise.

    igor.jpg

     

  • RonLar Profile Picture
    60 on 16 Nov 2022 at 20:43:02
    Re: Do If statements with Filters always need that second Filter to show information?

    Also, this may work even simpler: 

    Coalesce(First(Filter(Source, ID = ThisItem.ID)).Value, "")
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on 16 Nov 2022 at 20:34:11
    Re: Do If statements with Filters always need that second Filter to show information?

    @KRider 

     

    Coalesce(LookUp(Source, ID = ThisItem.ID).Value)
    //This function will return a blank if the result of the LookUp is blank) otherwise the value of the LookUp will be returned.

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 917 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 387 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 334 Super User 2025 Season 2

Last 30 days Overall leaderboard