cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Resolver III
Resolver III

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
Highlighted
Resolver III
Resolver III

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

Highlighted

I am so dumb.  That did it.

Highlighted

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,

Highlighted
Microsoft
Microsoft

@rubin_boer Thank you for always responding to forum posts.

Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,154)