Power Apps Filter function allows you to find a records in a table that match the specific condition criteria.
You can use more than one conditions to find a set of records in a table. If one or more records in a table match the condition criteria, it returns the records otherwise discard the records.
SYNTAX:
Filter(Table*, Formula1 [, *Formula2*, ... ] )
- Table – It is required. Table to search.
- Formula(s) – It is required. The formula by which each record of the table is evaluated. The function returns all records that result in true. You can reference columns within the table. If you supply more than one formula, the results of all formulas are combined with the And function.
Let’s look at an example of using the Filter function in Power Apps.
Here, we have a Gallery control named Gallery_Orders, which displays Order details.

Using Filter function to filter the gallery items
Let’s filter the records in the gallery for Category  Technology. Go to the Items property of gallery control and write the below formula.
Filter(
Orders,
Category = "Technology"
)

Now, you can see that the records in the gallery are filtered to show only the Technology category.

Let’s add another condition to the formula to filter the records for the Corporate segment as well.
Filter(
Orders,
Category = "Technology" && Segment = "Corporate"
)
Now, you can see that the records in the gallery are filtered by both the Technology category and the Corporate segment.

Filter the gallery items based on a value in text box
You can create a search box to filter the gallery items based on the value provided into it. To do this, we will add a Text Input control and style it as a search box.
First, go to the Insert tab, select Text input, and name the control txt_search.

Now, we will style it to look like a search box. Go to the Properties of the Text Input control.
First, remove any default text from the Default property. Then, set the Hint text property to ‘Search by Category’ as this will help users understand that they can filter records by category.

Next, go to the Items property of the gallery and enter the following formula.
This will filter the gallery to show categories that start with the text entered in the search box.
Filter(Orders,
StartsWith(Category, txt_search.Text)
)
Lets, filters the records in gallery for Category Furniture. You can see, it filters the records in gallery for category Furniture.
Note that we have used the StartsWith function, which filters the gallery records based on categories that begin with the characters entered in the search box. For example, if you type ‘Furni’, it will filter all categories that start with ‘Furni’.

Lets, add one for search criteria in this formula, and make it to filter the records for Country as well.
Now, you can enter either a Category or Country value in the search box, and the gallery will filter the records accordingly
Filter(
Orders,
StartsWith(
Category,
txt_search.Text
) || StartsWith(
Country,
txt_search.Text
)
)

You can see, it filters the records in gallery for Country United States.

The StartsWith function filters records that begin with the sequence of characters entered in the search box.
However, if you want to filter records based on a partial search, where the search text can appear anywhere within the column, you can use the IN operator.
Let’s modify the previous formula and use the IN operator, as shown below.
Filter(
Orders,
(txt_search.Text in Category) || (txt_search.Text in Country)
)

Now, you can see it filters the records for Country.

When we type State in the search box, it returns all records for the country United States because the text State appears within the country name.
 To filter the records for values selected in drop down
Lets, say we have a drop down control named ddl_Country. It is displaying countries.

Now, we want to filters the records in the gallery for selected country in drop down.
Following formula will filters the records in gallery for selected Country in dropdown.
Filter(
Orders,
(Country = ddl_Country.Selected.Value || 
ddl_Country.Selected.Value = Blank())
)
Now, you can see it filters the records in gallery for selected country

Note that, Filter function is one of the most common used function in Power Apps, and within Filter function we frequently use operators and search functions. Few common operators such as =, <, >, IN, AND (&&), OR ( || ) etc.. and Search function such as StartsWith, EndWith, Search etc..
When working with large datasets, it’s important to check whether the use of any operator or search function within the Filter function triggers a delegation warning.
If a delegation warning appears, consider how you can adjust the formula to avoid it.
To understand the delegation you can refer the post Understanding the Delegation.
Also Read..
Highlight selected item in gallery
Add Alternate background color to rows
Sort Items in gallery Power Apps
Change Item color in gallery based on value
![]()
