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 :
Power Apps - Building Power Apps
Answered

Filter gallery on multiple items

(0) ShareShare
ReportReport
Posted on by 102

Hi

 

I have two data sources.

Data1 have columns Class and NoteNumber.

So notes can be repeated in different classes.

Class1Note1
Class1Note2
Class1 
Class2Note1
Class2Note3

 

Data2 have NoteNumbers and NoteDescription

Note1Description1
Note2Description2
Note3Description3

 

Gallery1 is filtered by dropdown by Class.

We would like to show all Notes and Description in Gallery2.

So when Class 1 is selected, Note1 and 2 with descriptions are shown. 

Selection of Class2 will show Note1 and 3 with descriptions.

 

Inner join of two tables basically, where first one is filtered. 

 

Can someone advise how to filter Gallery2 effectively?

Thanks in advance!

I have the same question (0)
  • Faisal__Wasim Profile Picture
    56 on at
    Re: Filter gallery on multiple items

    Hi @Dulat ,

    Currently the relation you're showing is One - Many (Notes - Class) but it should be the other way round so you can Filter the 2nd Gallery with something like:

    Filter(NotesDataSource, Class = Gallery1.Selected.Class)

     

    Do let me know if you see any challenges, I am always happy to help.

    Regards,
    Faisal

    if this reply/solution works Mark it as the solution and give a thumbs-up.

  • Dulat Profile Picture
    102 on at
    Re: Filter gallery on multiple items

    Hi Faisal.

     

    Thanks for reply. It is not completely clear to me - I am very new in PowerApps.

    My Data2 doesn't have any Class column. Do I need to reshape my data sources?

     

    My goal is view are like these:

    If I filtered Gallery1 to show only Class1, then I want have Gallery2 showing:

    Note1Description1
    Note2Description2

     

    If I have chosen Class2, then Gallery 2 should be:

    Note1Description1
    Note3Description3

     

    Thanks,

    Dulat

  • Faisal__Wasim Profile Picture
    56 on at
    Re: Filter gallery on multiple items

    Hi, 

    Yes your Data should look something like this:

     

    Class1Note1
    Class1Note2
    Class1 
    Class2Note1
    Class2Note3

     

    Data2 must have a Class Column

    Note1Description1Class1, Class2
    Note2Description2Class1
    Note3Description3Class2

     

    Then you can use :

     

     

     

    Filter(NotesDataSource, Gallery1.Selected.Class in ClassColumn)

     

     

     

    or if you can make the Class table like this:

     

    Class1Note1, Note2
    Class2Note1, Note3

    then you can use:

     

     

    Filter(NotesDataSource, Notes in Gallery1.Selected.NotesColumn)

     

     

     

     SP is not a Relational DB so its a little confusing.

     

    Do let me know if you see any challenges, I am always happy to help.

    Regards,
    Faisal

    if this reply/solution works Mark it as the solution and give a thumbs-up.

  • Dulat Profile Picture
    102 on at
    Re: Filter gallery on multiple items

    Hi Faisal,

     

    Thanks! It is more clear now.

    Is it possible to use something like combobox as a transitional item?

    Pull there values from first Gallery or Dataset based on filter, and then use these values as a filter for second Gallery?

    Dulat

  • Faisal__Wasim Profile Picture
    56 on at
    Re: Filter gallery on multiple items

    Yes, I believe it may be possible. The Formula would be just a little complex. Can you try something like:

     

    Filter(NotesDataSource, Notes in Concat(Filter(Gallery1.AllItems,Class = ClassDropdown.Selected.Value),NotesColumn&","))

     

     

  • Verified answer
    Dulat Profile Picture
    102 on at
    Re: Filter gallery on multiple items

    Hi Faisal,

    Thanks for the help.

    I was not able to apply your code directly to the gallery, but adopted your code  by making unvisible text label in between.

    Concat(Filter( collection, 'CLASS' = Filter_class.Selected.Value ), 'NOTE', ", " ).

    Then I was filtering my gallery using values in this text label.

    Filter(Notes data, NOTES in LabelFilteredNotes)

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 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 381 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 225

Last 30 days Overall leaderboard