cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dyee
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
rubin_boer
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
rubin_boer
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,

askondo
Microsoft
Microsoft

@rubin_boer Thank you for always responding to forum posts.

dyee
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (58,540)