1. Understanding Multiple Gallery Filters
A gallery in Power Apps is commonly used to display records from a data source such as SharePoint, Dataverse, or SQL Server. By default, the gallery shows all available records. However, in real business applications, users often need to narrow down results based on specific criteria such as dates, product categories, status values, or other fields.
Multiple gallery filters allow users to apply several conditions at the same time. For example, a user may want to view only sales discount requests for a specific product within a selected date range. Instead of creating separate filtered views, Power Apps uses the Filter() function together with logical operators such as And() and Or() to evaluate all active conditions in one formula.
This approach provides a more flexible and user-friendly experience because users can:
Filter records by start date and end date.
Filter records by a product or category.
Combine date filters and product filters together.
Leave some filter controls blank to show broader results.
Reset all filters and return to the default gallery view.
In this tutorial, the gallery is connected to a SharePoint list named Sales Discount Requests. The filtering experience uses two date pickers for date range filtering and a dropdown control for filtering by product.
2. Setting Up the Gallery and Filter Controls
Before applying multiple filters, the app requires a data source and the appropriate input controls that users will interact with.
Data Source
The sample application uses a SharePoint list called Sales Discount Requests. This list contains fields such as:
Customer Name – stores the customer information.
Product – a SharePoint Choice column used for product selection.
Discount Percent – stores the discount percentage.
Effective Date – stores the date on which the discount becomes effective.
Gallery Control
A gallery control is added to the screen and connected to the Sales Discount Requests list through the gallery’s Items property. Initially, the gallery can simply show all records:
Filter Controls
The following controls are added to the screen to allow users to filter the gallery:
Start Date Picker – renamed
DP_start_dateto capture the beginning of the date range.End Date Picker – renamed
DP_end_dateto capture the ending date range.Product Dropdown – renamed
DRP_productand populated from the SharePoint Product choice column.Reset Button – clears all filter controls and restores the gallery view.
Validation Label – displays an error message when the start date is greater than the end date.
To populate the product dropdown with values from the SharePoint Choice column, use:
These controls create the foundation for a dynamic filtering experience, where the gallery updates automatically based on the user’s selected values.
3. Implementing Date Range Filtering
Date range filtering is useful when users need to view records that fall within a specific period. In this example, the gallery filters records based on the Effective Date field.
The basic date range formula checks whether each date picker has a value. If a date picker is blank, that side of the range is ignored. If a value is selected, the corresponding condition is applied.
How the Formula Works
IsBlank(DP_start_date.Value)checks whether the start date picker is empty.If the start date is blank, the first condition does not restrict the results.
EffectiveDate >= DP_start_date.Valueensures records are on or after the selected start date.IsBlank(DP_end_date.Value)checks whether the end date picker is empty.EffectiveDate
4. Adding Product Filters & Combining Multiple Conditions
Once the date range filter is working, additional filters can be added to further narrow the gallery results. In this tutorial, the second filter is a Product dropdown connected to a SharePoint Choice column.
Since the Product column stores choice values, the dropdown is populated using the Choices() function, allowing users to select one of the available products. To ensure the gallery still displays all products when no selection is made, the filter checks whether the dropdown is blank before applying the condition.
The date filters and product filter are then combined inside a single Filter() function using the And() operator. This means a record is displayed only when it satisfies every active filter while any blank filter is automatically ignored.
For example, users can:
- Filter records between a selected start and end date.
- Display only requests for a specific product.
- Combine both date and product filters simultaneously.
- Leave one or more filters blank without affecting the remaining filter conditions.
This approach creates a flexible filtering experience where users can easily narrow down records without needing multiple gallery views or complex navigation.
5. Reset Functionality, Validation & Best Practices
An effective filtering experience should also allow users to quickly clear all applied filters and return to the default gallery view.
Resetting Filter Controls
A Reset button is added to the screen to clear the date pickers and product dropdown. Using the Reset() function for each control restores the gallery to its original state or to any default values that have been configured.
This makes it easy for users to start a new search without manually clearing every filter.
Validating the Date Range
To prevent invalid searches, the app displays an error message whenever the Start Date is greater than the End Date. The validation label only becomes visible when both date pickers contain values and the selected range is incorrect.
This simple validation improves the user experience by preventing confusing or inaccurate search results.
Best Practices
When building multiple gallery filters, keep these recommendations in mind:
- Always check whether a filter control is blank before applying its condition.
- Compare SharePoint Choice columns using the Value property.
- Use meaningful control names such as DP_StartDate and DRP_Product for easier maintenance.
- Format long Power Fx formulas to improve readability.
- Test different filter combinations to ensure the gallery behaves correctly in every scenario.
Following these practices helps create a scalable filtering solution that is easier to understand, maintain, and extend as new filtering requirements are added.
6. Conclusion
Applying multiple filters to a Power Apps gallery significantly improves how users interact with business data. Instead of scrolling through large datasets, users can quickly narrow results using combinations of date ranges, product selections, and other filter criteria.
In this tutorial, we explored how to build a flexible filtering experience using two date pickers, a product dropdown, and Power Fx formulas. We also implemented reset functionality, validated incorrect date ranges, and followed best practices to ensure the gallery remains user-friendly and reliable.
As your applications grow, this same filtering approach can be extended to include additional fields such as status, customer, department, priority, or location. By combining multiple filters within a single Filter() function, you can create dynamic, responsive galleries that help users find the exact information they need quickly and efficiently.