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 the items in fi...
Power Apps
Answered

Filter the items in filter dropdowns

(2) ShareShare
ReportReport
Posted on by 315

I have a gallery which displays item from a table.

I have three dropdowns to filter the items based on what people want to see.

If I choose a department in one dropdown filter, then the list will display all items owned by the department. The issue is that the other filter dropdowns still will have all options available, even those who do not apply for this department. So you can possibly get a blank list.


The ideal situation is that the dropdowns only will show filters which apply to the other selected filter.

 

I use this code to get items for the three dropdowns:

Concurrent(
 ClearCollect(collectStatusFilter, {Result: "Alle"});Collect(collectStatusFilter,(Distinct(Filter('Equipment List',ItemStatus <> Blank() && Plant = myPlant),ItemStatus))),
 ClearCollect(collectCategoryFilter, {Result: "Alle"});Collect(collectCategoryFilter,(Distinct(Filter('Equipment List', Category <> Blank() && Plant = myPlant),Category ))),
 ClearCollect(collectDepartmentFilter, {Result: "Alle"});Collect(collectDepartmentFilter,(Distinct(Filter('Equipment List', Department <> Blank() && Plant = myPlant),Department)))
 )

 

I did make the ideal situation work using a lot of if-sentences to overwrite existing collection based on the inputs. But due to the many amounts of if's and I assume the ClearCollect part of each if, the app took ages to load (did work fine when it finally finished loading though).

 

This is the code from one of my dropdowns at the moment:

SortByColumns(collectDepartmentFilter,"Result",Ascending)


Does anyone know a solution to my problem? 🙂

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

    Please disregard - mis-read question.

  • Verified answer
    WarrenBelz Profile Picture
    155,224 Most Valuable Professional on at

    @mrstian89 ,

    I have some time now to look at this properly - firstly do a Collection

    ClearCollect(
     colFilters,
     GroupBy(
     Filter(
     'Equipment List',
     Plant = myPlant
     ),
     "Department",
     "Category",
     "Item",
     "Data"
     )
    )

    Department dropdown

    Sort(
     Distinct(
     colFilters,
     Department
     ),
     Result
    )

    Category dropdown

    Sort(
     Distinct(
     Filter(
     colFilters,
     Department = YourDepartmentDD.Selected.Result
     ),
     Category
     ),
     Result
    )

    Item dropdown

    Sort(
     Distinct(
     Filter(
     colFilters,
     Department = YourDepartmentDD.Selected.Result && 
     Category = YourCategoryDD.Selected.Result
     ),
     Item
     ),
     Result
    )

     

    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

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
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard