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 / Filtering a gallery to...
Power Apps
Unanswered

Filtering a gallery to only those records that exist in a second table

(0) ShareShare
ReportReport
Posted on by 364

Hi all,

 

I have a gallery with about 800 records in. I would like this to be filtered to only show those records that exist in another table. If I do it as a label on each row of the gallery, I can get it to say "Present" or "not Present", depending on whether it exists or not, but I would like this to happen in the Items property, so the gallery just shows those are are "Not Present"?

Categories:
I have the same question (0)
  • victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    You can add a column to the source of the gallery to check if it exists or not and then filter, like this:

    Filter(
     AddColumns(
     Source,
     "NewColumnName",
     If(
     Condition to check if exist in the other table,
     "Present",
     "Not Present"
     )
     ),
     NewColumnName = "Not Present"
    )

     

  • EpicTriffid Profile Picture
    364 on at

    Hi @victorcp , thank you, but I need to know how to then check the condition. I can't use ThisItem as i did in the gallery, I need it to essentially be EachItem, if that makes sense?

     

    Filter(
     AddColumns(
     '[dbo].[Support]',
     "Check",
     If(
     Not(Each Item in Support).Entry_ID in '[dbo].[StaffTotals]'[@Entry_ID],
     "Present",
     "Not Present"
     )
     ),
     Check = "Not Present"
    )
  • victorcp Profile Picture
    2,350 Moderator on at

    yes, but when we use filter we just need to pass the name of the column, so you function will be something like this:

    Filter(
     AddColumns(
     '[dbo].[Support]',
     "Check",
     If(
     Entry_ID in '[dbo].[StaffTotals]'[@Entry_ID],
     "Present",
     "Not Present"
     )
     ),
     Check = "Not Present"
    )

    Let me know if it worked

  • EpicTriffid Profile Picture
    364 on at

    Hi @victorcp 

     

    Unfortunately, it still doesn't work. Not only does it not return results, but it seems to freeze frequently, as if it is trying to pull back too much data or something. I can clearly see in my DB that there are only about 85 records that should appear though.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard