#PowerPlatformTip 23: 'Filter Blank'
TL;DR: Add
|| IsBlank(YourFilterInput)to a gallery’sFilterso it shows every item while the search box is empty. Refer to columns by name insideFilter, not withThisItem.
💡 Challenge
Filtering galleries in Power Apps based on user input (a text input, dropdown or combo box) is common, but when the input is empty you usually want to show all items instead of none.
✅ Solution
Add an || IsBlank(YourFilterInput) condition to your filter formula. When the input is empty, that part is true for every record, so nothing is filtered out.
🔧 How It’s Done
-
Create a gallery and add your filter input (text input, dropdown or combo box).
-
Set the gallery’s
Itemsproperty:Filter(YourDataSource, Condition || IsBlank(YourFilterInput))Example with a text input:
Filter(Projects, Title = txtSearch.Text || IsBlank(txtSearch.Text))🔸
YourDataSourceis the table, list or collection.🔸
Conditioncompares a column with the input. InsideFilteryou refer to the column by its name (Title) or withThisRecord.Title.ThisItembelongs to the gallery template, not toFilter.🔸
IsBlanktreats an empty string as blank, so an empty text box counts as “no filter”. -
Use the right blank check per control type:
// Dropdown Filter(Projects, Status = ddStatus.Selected.Value || IsBlank(ddStatus.Selected.Value)) // Combo box (single select) with Items = Projects Filter(Projects, Region = cbRegion.Selected.Region || IsBlank(cbRegion.Selected.Region))
🎉 Result
When the filter input is empty, the gallery shows all items. As soon as the user enters or selects a value, the gallery filters on it.
🌟 Key Advantages
🔸 One formula instead of an If around two different Filter calls.
🔸 Users see data immediately instead of an empty gallery.
🔸 Scales to several inputs, each with its own blank check.
⚠️ Delegation
IsBlank(txtSearch.Text) doesn’t depend on any column, so Power Apps evaluates it once and sends it to the data source as a constant. Or (||), = and IsBlank are on the list of delegable operations for Filter, so this pattern itself doesn’t block delegation. Whether the whole formula is delegated depends on the operator in Condition and on the data source: StartsWith is delegable to SharePoint and Dataverse, the in operator is not delegable to SharePoint. If the formula is not delegable, the formula bar shows a delegation warning and Power Apps only processes the first 500 records (Data row limit, adjustable up to 10,000 in Settings), so records further down are missing from the gallery without an error.
🎥 Video Tutorial
🛠️ FAQ
1. Can I use multiple filter conditions with the IsBlank() check?
Yes. Give each input its own blank check and combine them with &&: Filter(DataSource, (Condition1 || IsBlank(Input1)) && (Condition2 || IsBlank(Input2))).
2. Does this technique work with all data sources in Power Apps?
The formula works with any data source that supports Filter. For large data, check the delegation warning: it depends on the data source and on the operator used in the condition, not on the IsBlank part.
3. Why is Filter(Projects, ThisItem.Title = txtSearch.Text) wrong?
ThisItem refers to the current record of a gallery or form template. Inside Filter, the record being checked is available by column name or through ThisRecord, so write Title = txtSearch.Text or ThisRecord.Title = txtSearch.Text.
🔗 Related Tips
🔸 #PowerPlatformTip 33: ‘Coalesce’ - replace nested If(IsBlank()) checks elsewhere in the same app with one function.
🔸 #PowerPlatformTip 38: ‘Data Refresh’ - keep this gallery’s data fresh without reloading everything on every keystroke.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).