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 / Filter Gallery based o...
Power Apps
Answered

Filter Gallery based on dropdown

(0) ShareShare
ReportReport
Posted on by 384

Hi all,

I am trying to filter a gallery based on the selection of a dropdown.

Datasource is a SharePoint List.

In the dropdown I choose a Title and based on this selection the Gallery should show only items from another column from that SharePoint List. I want to get the ID of the selected item and then show all other items from the SharePoint list that have the same ID.

I am somehow stuck here...can anybody assist?

Kind regards

FRank

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    Hi @Frankie70 ,

    Firstly, can you please share your code (in Text) you have used and any errors/results of it. As well ID is a unique value in SharePoint, so there are no items with the same ID.

  • Frankie70 Profile Picture
    384 on at

    Hi @WarrenBelz 

    in the Gallery I have to follwing:

    Items: Filter(HubSiteList, DepartmentID = Dropdown1.Selected.DepartmentID).

     

    Frankie70_0-1670217486257.png

    So, I choose a Site (Title) in the dropdown (this site has a DepartmentID and the property isHubsite = true).

    In the gallery I would like to show all sites that have the same DepartmentID but the property isHubsite = false)

     

    Thanks for helping.

     

     

  • WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    @Frankie70 ,

    Assuming Hubsite is a Boolean (yes/no) column and you want the DepartmentID selected where Hubsite is false

    Filter(
     HubSiteList, 
     DepartmentID = Dropdown1.Selected.DepartmentID &&
     !Hubsite
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Frankie70 Profile Picture
    384 on at

    Hi @WarrenBelz 

     

    this is what I already tried.

    DepartmentID is not accepted for some reason...

    Frankie70_0-1670218617287.png

     

  • WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    @Frankie70 ,

    That was your code posted initially - I also assume IsHubSite is a Text field ?. What is the Items of Dropdown1 ?

  • Frankie70 Profile Picture
    384 on at

    Hi @WarrenBelz 

    Dropdown1:

    Items = Distinct(Filter(HubSiteList, isHubSite = "true"), Title)

     

    Yes, isHubSite is a Text field.

  • WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    @Frankie70 ,

    Assuming HubSite is a Text field

    Filter(
     HubSiteList, 
     DepartmentID = Dropdown1.Selected.Result &&
     HubSite = "false"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Frankie70 Profile Picture
    384 on at

    Hi @WarrenBelz 

    but the selected item's DepartmentID must be used for the filter. "Dropdown1.Selected.Result" returns the title.

  • Verified answer
    WarrenBelz Profile Picture
    154,393 Most Valuable Professional on at

    @Frankie70 ,

    You have made it difficult for yourself with the Distinct() filter - it needs to be

    With(
     {
     wDept:
     LookUp(
     HubSiteList,
     Title = Dropdown1.Selected.Result 
     ).DepartmentID
     },
     Filter(
     HubSiteList, 
     DepartmentID = wDept && HubSite = "false"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Frankie70 Profile Picture
    384 on at

    Hi @WarrenBelz 

    that exactly did the trick!!

    Thanks a lot for that!

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard