cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
fernandocxv
Level: Powered On

Help with filter

Hi all,

 

How are you?

 

I would like to find an efficient way to filter a datasource in function of a combobox. This combobox has sever options: A, B, C, ... and All. If I choose All, I don't want to apply the filter. I have thought of using the following trick:

 

Filter(Datasource, If(Combobox.Selected.Value = "All",1=1,Column = Combobox.Selected.Value))

Is there any way to achieve this?

 

Thank you in advance.

 

Best regards,

 

Fernando

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Help with filter

Hi @fernandocxv 

 

check my video on this

https://www.youtube.com/watch?v=pn50AKn3Q1Y

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

3 REPLIES 3
Super User
Super User

Re: Help with filter

Hi @fernandocxv 

 

check my video on this

https://www.youtube.com/watch?v=pn50AKn3Q1Y

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: Help with filter

Hi @fernandocxv ,

Could you please share a bit more about your issue?

Is there some error message with your Filter formula?

Further, could you please share a bit more about the column (filter column) you used in your Filter formula? Is it a Single text type column or Choice type column?

 

Based on the formula you provided, I could not find any syntax error with it. Please consider modify your formula as below:

Filter(
Datasource,
If(
Combobox.Selected.Value = "All",
true,
Column = Combobox.Selected.Value
)
)

If the filtered Column you used in your Filter formula is a Choice type column, please consider modify your formula as below:

Filter(
        Datasource, 
        If(
           Combobox.Selected.Value = "All",
           true,
           Column.Value = Combobox.Selected.Value
       )
)

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
fernandocxv
Level: Powered On

Re: Help with filter

There is no issue, I just was looking for a way in which I avoid using 1=1 in my code. As I can see, it is better solution to use true.

 

Thank you @v-xida-msft!

 

Best regards,

 

Fernando

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 350 members 5,166 guests
Please welcome our newest community members: