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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery by mult...
Power Apps
Unanswered

Filter gallery by multiple entity filters

(0) ShareShare
ReportReport
Posted on by 36

Hey! Powerapps noob here. I have been trying to work out how to filter a gallery by multiple entity filters.

The first entity in my CDS which is SKUs that contains all my items in the gallery to be filtered on.

Here is the code I am using to filter the gallery items based on a SKU drop down which works perfect:

 

 

Filter(SKUs, Colour = 'Colour dropdown'.Selected.Result)

 

 

The second entity in my CDS is "Brands" which has a field called "Brands family" which has a one-to-many relationship with the SKUs entity. 

How can I adjust my gallery code to filter out the SKUs that match/don't match the dropdown for Brands Family?

 

Filter(SKUs, Colour = 'Colour dropdown'.Selected.Result &&
 // filter SKUs by Brands, 'Brands Family' = 'Brands family dropdown'.Selected.Result
)

 


Thank you for any help it is much appreciated. 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Use:

    Filter(SKUs, 'Brands family' in Brands.'Brands family' &&

    Colour = 'Colour dropdown'.Selected.Result)

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • bennstef Profile Picture
    36 on at

    Thank you for your reply. The Brands Family value can be changed by a drop down, so should it be something like this?:

    'Brands family' in Brands.'Brands family' = 'Brands family dropdown'.Selected.Result

     

  • eka24 Profile Picture
    20,923 on at

    Do you have two dropdowns?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • bennstef Profile Picture
    36 on at

    Yes thats the case

  • eka24 Profile Picture
    20,923 on at

    Based on the fact, create a collection;

    ClearCollect (MySKU,

    Filter(SKUs, 'Brands family' in Brands.'Brands family' ))

     

    Then filter using the Collection;

    Filter (MySKU, 'Brand Family'='Brand Family Dropdown'.Selected.Result&&

    Colour = 'Colour dropdown'.Selected.Result)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • bennstef Profile Picture
    36 on at

    Thanks dude, I have tried to implement this but it does not seem to be working. 

    ClearCollect (MySKU, Filter(SKUs, 'Brands family' in Brands.'Brands family' ))

     

    Won't the above code filter out the brands family anyhow? I don't understand how this is meant to allow me to filter the gallery using the fields from both the SKUs & Brands entitys drop downs. 

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Syntax-for-joining-tables/td-p/61387 << Isn't something like this more appropriate? 

  • eka24 Profile Picture
    20,923 on at

    I think you did not understand the code. I gave two codes, the first to filter in a collection and the Second to filter on the Gallery.

    Did yo try and what was the result

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • bennstef Profile Picture
    36 on at

    Both the drop downs and the gallery (images).

  • bennstef Profile Picture
    36 on at

    The clearcollect code and entitys.

    Brands was changed to demand families.

    Can you please check the code to see where I have gone wrong?

    Thanks so much!

  • bennstef Profile Picture
    36 on at

    4.PNG3.PNG1.PNG6.PNG2.PNG5.PNG

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard