Filtering data and displaying the results in controls such as galleries and data tables is a regular task when dealing with Power Apps.
I was recently working with Power Apps List box control, where I needed to filter the SharePoint list data and display the result in a gallery control.
In this article, I will explain to you how to filter list box in Power Apps, including various examples like:
- Power Apps filter list box using the SharePoint Choice field
- Power Apps filter list box using the SharePoint Date field
- Power Apps filter list box and search
How to Filter List Box in Power Apps
So, let’s start with filtering the Power Apps list box control with the scenarios below.
Power Apps filter list box using SharePoint Choice column
I have a SharePoint Online List named “Project Tracker“. This list contains the below fields.
| Column Name | Data Type |
| Project Name | This is a Title column with a single line of text. I just renamed it to “Project Name” |
| Description | Multiple lines of text |
| Project Status | Choice |
| Start Date | Date and time |
| End Date | Date and time |
Refer to the below screenshot:

In Power Apps, there is a List box control and a Gallery control. The List box control has all the list choice values like All, In Progress, Not Started, and Completed.
The gallery will filter and show all records from the SharePoint list based on the user’s selections when they choose any value from the List box control.
Refer to the below image:

To achieve this, follow the instructions below:
1. Open Power Apps -> Create Power Apps canvas app -> Connect the SharePoint list [Project Tracker] to the app. Once you connect, it will look like the screenshot below.

2. Select the Power Apps Screen [ProjectTrackerScreen] -> Set its OnVisible property to the code below.
OnVisible = ClearCollect(
colProjects,
{Value: "All"}
);
Collect(
colProjects,
Distinct(
'Project Tracker',
'Project Status'.Value
)
)
Where,
- colProjects = Power Apps Collection
- {Value: “All”} = Collection Item
- Distinct() = This function can remove duplicate values from a data source
- ‘Project Tracker’ = SharePoint Online List
- ‘Project Status’.Value = SharePoint Choice Field Column Values

3. Next, insert a List box control [ListBox_ProjectStatus] -> Set its Items property as:
Items = colProjects
Where,
- colProjects = Power Apps Collection

4. Insert a Gallery control and set its Items property as shown below:
Items = If(
ListBox_ProjectStatus.Selected.Value = "All",
'Project Tracker',
Filter(
'Project Tracker',
'Project Status'.Value = ListBox_ProjectStatus.Selected.Value
)
)
Where,
- If() = This function helps us to evaluate multiple unrelated conditions
- ListBox_ProjectStatus.Selected.Value = “All” = Power Apps List box name, and “All” is the collection item value
