cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NoamShnarch
New Member

No filter of blank data

Hello everyone, 

So i made a filtering screen with 2 dropdown lists. I want that I will have the option to not fill the 2 of them so I could filter by only 1 dropdown if I will want. 

The problem is that when the dropdown is blank it searches for blank content and its giving me nothing.

How can I make blank dropdown to just not filter?

This is an example of my function:

Filter(Data,column1=dropdown1.selected.qqq,column2=dropdown2.selected.www)

Thank you in advance. 

5 REPLIES 5
RandyHayes
Super User
Super User

@NoamShnarch 

Please consider changing your Formula to the following:

Filter(Data,
    (IsBlank(dropdown1.Sselected.qqq) || column1=dropdown1.Selected.qqq) &&
    (IsBlank(dropdown2.Sselected.www) || column2=dropdown2.Selected.www)
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Drrickryp
Super User
Super User

@NoamShnarch 

Filter(
    Data,
   IsBlank(Dropdown1.Selected.Value) ||qqq = Dropdown1.Selected.Value, 
   IsBlank(Dropdown2.Selected.Value) ||www = Dropdown2.Selected.Value
)

Im getting this error, do you know what should I do? 

16608891482036651685859134819275.jpg

Ricardo_Costa
Resolver I
Resolver I

You can just use "In" instead "="

Filter(Data,dropdown1.selected.qqq In column1, dropdown2.selected.www In column2)

blank is in every content that is how I usually filter

 

@NoamShnarch 

Are those Choice columns in your datasource?  If so, then append a .Value at the end of your column name in the formula.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,843)