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

Filter ComboBox

Good afternoon,

I have 2 comboBoxes: Month and Week. If I select a month, I want to show all the weeks that corresponds to every single month. For that I want to use a filter function but it doesn't work for me.

Thanks

 

 

Sp List.PNGComboBox Filter.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @JoseC12 ,

Could you tell me

1)is Input_MesTarea a combo box?
2)Input_MesTarea's Items?

3)Mes field's data type?

I assume that Mes field's data type is text type, Input_MesTarea is a combo box.

If Input_MesTarea's Items is [@SEMANA] , you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.MES)

If Input_MesTarea's Items is ["..",....], you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.Value)

If Input_MesTarea's Items is Distinct([@SEMANA],....),you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.Result)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
mdevaney
Super User
Super User

@JoseC12

I would suggest using the IN operators instead of equals ( = )  and dropping the .Values.  Please give my code a try and let me know what happens.

 

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Neither does it work, it gives me an error

Error.PNG

@JoseC12 

The formula appears to be working except for the delegation warning.  How many rows in your datasource?  Did you increase the delegation row limit to 2,000 in advanced settings?

 

You also have several other error messages.  What do those say?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

I've recently changed the row limit.

The other errors I can manage, don't worry about that

@JoseC12 

I have thought about this problem and I have another idea.   It looks like the user will only select a single item from the ComboBox, correct?  Then we can change the formula like this to avoid delegation warnings.

 

Filter([@SEMANA]; MES = InputMesTarea.Selected)

 

The IN operator is what causes the problem.  We don't need it for single selections though.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

v-yutliu-msft
Community Support
Community Support

Hi @JoseC12 ,

Could you tell me

1)is Input_MesTarea a combo box?
2)Input_MesTarea's Items?

3)Mes field's data type?

I assume that Mes field's data type is text type, Input_MesTarea is a combo box.

If Input_MesTarea's Items is [@SEMANA] , you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.MES)

If Input_MesTarea's Items is ["..",....], you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.Value)

If Input_MesTarea's Items is Distinct([@SEMANA],....),you could try this formula:

Filter([@SEMANA]; MES in InputMesTarea.SelectedItems.Result)

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (4,132)