cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
irsimeonov1
Level: Power Up

Can a wildcard be used to indicate 'all items' in a Filter function?

Hi

 

I am trying to understand whether I can somehow replicate Excel's * in a filter function so that the function returns all items in a table. For example Filter(TableName, Column1 = "*"), what do I need to put instead of the * so that the function returns all of the records in TableName?

 

Thanks

3 REPLIES 3
Power Apps Staff carlosag
Power Apps Staff

Re: Can a wildcard be used to indicate 'all items' in a Filter function?

There is no wildcard as such, but there are a few ways you could achieve that by for example using an "If" and return either the full datasource or a filter expression, or you can use an "Or" to check if it should return all of the rows, here is what I do:

 

	Filter(UserMessages, Email = Dropdown1.Selected.Value || Dropdown1.Selected.Result = "<All>" )

 

irsimeonov
Level: Powered On

Re: Can a wildcard be used to indicate 'all items' in a Filter function?

Thanks, that is a nice way to do it 🙂

Highlighted
Charles_John
Level: Powered On

Re: Can a wildcard be used to indicate 'all items' in a Filter function?

This is old, but there is not a whole lot of documentation and help for PowerApps so i'm adding where i can.

 

I don't understand the "<All>" syntax of the accepted solution, so this is what I did:

 

Filter(
TargetTable,
If(
DropDown1.Selected.Value <> "[YourDefaultValue]",
DropDown1.Selected.Value = TableFilterColumn1,
TableFilterColumn1 in DropDown1Selections
),
If(DropDown2.Selected.Value <> "[YourDefaultValue]",
DropDown2.Selected.Value = TableFilterColumn2,
TableFilterColumn2 in DropDown2Selections
),
...
)

 

And you can continue the logic for how every many dropdown filters you want to use. Each dropdown when not equal to the first/default value will act as an AND filter for the returned table, which I use as the Items property of a gallery.

 

Be sure to set DropDown1 Items property = DropDown1Selections and DropDown2 Items property = DropDown2Selections. I Collect the two collections with a button.

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,724)