Handle empty combobox when filtering Galleries in Power Apps

When you are using a combobox to filter a gallery based on the selection, you can check if the selection is blank or not, and depending on that, show only the records that match the combobox selection or show all records. This approach is commonly used in Power Apps consulting to enhance user experience and improve data filtering.

For below scenario, we want to filter the Category of each record based on the selection in the combobox.

Turn your ideas into digital solutions

Our team guides you step by step to build custom apps in Power Platform.

Below could be used for that purpose:

BUT there is a cleaner and simpler way to achieve this in Power Apps, all in a single line of code:

				
					Filter('App Usage', category=cmbCategory.Selected.Value || IsEmpty(cmbCategory.Selected.Value) || IsBlank(cmbCategory.Selected.Value)) 
				
			

All done! Use this tip to keep your app code clean and easy!

Is your business ready for automation?

Automate processes with Microsoft Power Platform.