web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
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)
  • 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.

     

  • 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, "")
  • 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

     

  • 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 18 Nov 2022 at 14:05:53

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 686 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 433 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 266 Moderator

Last 30 days Overall leaderboard
Loading started
Loading started
Loading complete