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 combobox results
Power Apps
Unanswered

Filter combobox results

(0) ShareShare
ReportReport
Posted on by 254 Microsoft Employee

I have a gallery which shows results from a collection (colMyCollection).  I have multiple comboboxes above the gallery for filtering the gallery.  In my Department Combobox I am using the following function in Items property:-

Sort(ForAll(Distinct(colMyCollection,Department), {Result: ThisRecord.Value}),Result)

 

I now want to show a second combobox that shows only the distinct disciplines from colMyCollection that have the same department as selected in the Department combobox.

 

If no Department is selected I'd like my discipline combobox to show all distinct disciplines, if a department is selected from the first combobox I'd like my Discipline combox to only show disciplines that have the same department.

 

I'm sure this is simple to do but I've been away from PowerApps for a while and can't figure this out.

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,763 on at

    If(IsBlank(DepartmentComboBox.Selected.Value), Distinct(colMyCollection, Discipline), Distinct(Filter(colMyCollection, Department = DepartmentComboBox.Selected.Value), Discipline) )

     

    Please click Accept as solution and give it Thumbs Up 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.

  • SteveSmith81 Profile Picture
    11 on at

    Firstly, I think you might be overcomplicating your Department combobox.
    Unless I'm missing something (which is entirely possible), you could use something like this...
    Sort(Distinct(colMyCollection,Department),Value)

    On your main question, you can use @developerAJ's formula above, or this would also work.

    Distinct(
    Filter(
    colMyCollection,
    Department = cboDeptFilter.Selected.Value || IsBlank(cboDeptFilter.Selected.Value)
    ),
    Discipline
    )


    I'm not sure if there is any advantage of one over the other.

    Both @developerAJ's answer and mine are assuming your department combo box isn't multi-select. If you're allowing multi-select you'll need to adapt the formulas to use SelectedItems rather than Selected.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard