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 records that...
Power Apps
Answered

Filtering records that are NOT in another table and showing in gallery

(0) ShareShare
ReportReport
Posted on by 182

Need a bit of help here.  I have a gallery that displays some master records, say like Customers.  The user can click on a customer record and it will bring up any orders for that customer and those are listed in a second gallery.  I have a third gallery that needs to display items that the customer did NOT order.  So say the customer is #100.  They two orders, 1001, 1002.  The inventory list is A, B, C, D, E.  For order 1001 they ordered items A, C, E.  For order 1002 they ordered A, B, C, D and E.  So what I need is this third gallery to show items B and D if the first order (1001) is selected.  If order 1002 is selected then it would not display any records because all five items are in the order.  Hope this makes some sense.  That third gallery is meant to show exceptions so if it's items are missing from another table (the order table) then they will be listed.

 

Thanks

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @guyinkalamazoo 

    With the proviso that the table in question does not contain more than 2k items, (under the delegation limit), you can do something like this:

    With(
             {finv: ItemsPropertyfrom Gallery2},
      Filter(
               InventoryList, !(ID in finv.ID)
      )
    )

    The With() formula creates a table that is the same as your gallery2 and then filters the inventory list against the Items that have been previously selected.  Because the "Not" and "in" operators are used in this formula, delegation limits will apply so your inventory list cannot exceed 2k items. 

  • guyinkalamazoo Profile Picture
    182 on at

    And yes, the table would contain under 2K.  And thanks for this information!  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard