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
Unanswered

Filter gallery based on listbox selections

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallery in my app which is a list of staff and their job titles/departments (colAllStaff). 

There are two listboxes on one screen next to the gallery. ListBox1 is all departments taken from colAllStaff which the user can select from (colDepartments).

ListBox2 is management level - two options are 'Directors and Heads of' and 'Managers and Assistant Managers'.

I have been able to set up filters for when there are departments selected or management levels selected but haven't combined the two.

So for departments I have:

SortByColumns(If(IsEmpty(ListBox1.SelectedItems), colAllStaff,Filter(colAllStaff, Department in conSelectDept)), "Department")

For management level I found it easier to add a textbox with a concat of the listbox selected values, so this is:

If("Managers and Assistant Managers" = Label18.Text, Filter(colAllStaff, "Manager" in JobTitle), If("Directors and Heads of" = Label18.Text, Filter(colAllStaff, "Director" in JobTitle || "Head of" in JobTitle ||"Chief" in JobTitle), If( Label18.Text = "Directors and Heads of, Managers and Assistant Managers" || Label18.Text = "Managers and Assistant Managers, Directors and Heads of", Filter(colAllStaff, "Director" in JobTitle || "Head of" in JobTitle ||"Manager" in JobTitle), colAllStaff)))

 To combine them together would be quite long winded as users may select from department and not management level, or just management level, or use both filters. Have I missed a simpler way to do this?

Categories:

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard