cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Filtering by Multiple Columns

I'm trying to figure out the most efficient way to filter a gallery w/ multiple columns.  Ideally, I'd like to do a single filter function like...

 

Filter(DataSource, 

If(!IsBlank(Criteria1), Column 1 = Criteria1,true)

If(!IsBlank(Criteria2), Column 2 = Criteria2,true)

If(!IsBlank(Criteria3), Column 3 = Criteria3.true)

 

The problem I can't figure out a way to do this without using IsBlank.  I'm using a sharepoint list and I get a delegation issue.  the only workaround I can think of is shove everything into a big collection and then filter off that or write a really long filter function where I write out every combination.    

 

Edit: I thought startswith would work but I'm getting a delegation issue.  

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

hi there

 

maybe im getting this wrong but do you wish the filter to check whether any of the columns satisfy the search? if so Filter(DataSource, column1 = criteria1 || column2 = criteria2 || column3 = criteria3) should do it. if one is blank then the other two gets evaluated?

 

View solution in original post

5 REPLIES 5
Super User
Super User

hi there

 

maybe im getting this wrong but do you wish the filter to check whether any of the columns satisfy the search? if so Filter(DataSource, column1 = criteria1 || column2 = criteria2 || column3 = criteria3) should do it. if one is blank then the other two gets evaluated?

 

View solution in original post

I am so dumb.  That did it.

great stuff, im glad it helped.

i miss these things at times as well (and goes duh), i know the feeling :).

have a good day,

Microsoft
Microsoft

@rubin_boer Thank you for always responding to forum posts.

Helper I
Helper I

I lied.  The filter didn't work because it will consider a blank item to be a filter.  I set up a variable that determined if I was filtering by item 1 item 2 or item 3.  Then I wrote filter statements for every possible solution.  It's a super big pain in the butt.  

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,523)