web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combo box to filter da...
Power Apps
Answered

Combo box to filter data in data table is not working when used along with other filters

(0) ShareShare
ReportReport
Posted on by 15

Hi All,

 

 I have developed a powerapp screen which has a data table with SQL Server as a source. I have multiple single select drop down filters to filter data in the data table. This is currently working fine.

Now i got a requirement to change one of the single select to multi select filters. I changed that particular drop down to combo box and when i applied the following code in my items property along with other filter conditions, i am getting some random filtered output. When i remove all the filter conditions and apply only the combo box condition, my output works fine.

 

Collection :

ClearCollect(DD,
ForAll(Distinct(Table,Column),
{Result: ThisRecord.Value}
));

 

ComboBox Items Property : DD.Result

 

In data table Items Property Filter condition:

Filter(Table,
If(IsBlank(ComboBox.Selected.Result), true,
Column in ComboBox.Selected.Result))

 

The above condition is not working when i add another filter condition with this.

 

EX:

Filter(Table,
If(IsBlank(ComboBox.Selected.Result), true,
Column in ComboBox.Selected.Result),

status = "1")

 

I tried the same by replacing the comma with and.. 

 

Filter(Table,
If(IsBlank(ComboBox.Selected.Result), true,
Column in ComboBox.Selected.Result) &&

status = "1").

 

This also doesn't works. Can someone help here with a solution?

Thanks in advance.

 Keerthanagowsi.

Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Keerthanagowsi ,

    Firstly to tidy up a few things and get rid of the redundant Result reference - Collection

    ClearCollect(
     DD,
     Distinct(
     Table,
     Column
     )
    );

    Items

    DD.Value

    First filter (and here is another question - if this is a Single Select combo box, why the in Filter ? You should need

    Filter(
     Table,
     Len(ComboBox.Selected.Value) = 0 ||
     Column = ComboBox.Selected.Value
    )

    and to add your second filter - assuming Status is a Text field.

    Filter(
     Table,
     (
     Len(ComboBox.Selected.Value) = 0 ||
     Column = ComboBox.Selected.Value
     ) &&
     status = "1"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Keerthanagowsi Profile Picture
    15 on at

    Hi @WarrenBelz ,

     

    Thanks for the reply.

     

    Answer for the question you have asked. The requirement is for multiselect. That's why i used in .

     

    I have tried the above solution and that is working as a single select. When i select multiple columns from the drop down, it is giving result only for the last selected value.

     

    So i changed the code from 

    Column = ComboBox.Selected.Value

     to 

    Column in ComboBox.SelectedItems.Value

    Now this is again giving incorrect output. 😞

  • Verified answer
    WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Keerthanagowsi ,

    Assuming here that your Combo Box is a multi-selection, but your field is only a single value (below is for Text, but is a Single Choice column, you need Column.Value )

    Filter(
     Table,
     (
     Len(ComboBox.Selected.Value) = 0 ||
     Column in ComboBox.SelectedItems
     ) &&
     status = "1"
    )

    If your field is also multi-select, then this gets messy

    With(
     {
     wData:
     Filter(
     Table,
     status = "1"
     )
     },
     If(
     Len(ComboBox.Selected.Value) = 0,
     wData,
     Ungroup(
     ForAll(
     ComboBox.SelectedItems As aSel,
     Filter(
     wData,
     aSel.Value in Column.Value
     )
     ),
     "Value"
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Keerthanagowsi Profile Picture
    15 on at

    Thankyou @WarrenBelz . This works 🙂

  • Keerthanagowsi Profile Picture
    15 on at

    Hi @WarrenBelz ,

     

    Can i ask one more follow up question for this?

    My drop down is also a multi select and my field is also a multi select. 

    The above one gives solution for one combo box.

    What should i do, if i need to have multiple multi select combo box with multi field/value selections, along with status filter? 

     

    TIA

  • Verified answer
    WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Keerthanagowsi ,

    You need just keep cascading - note (I forgot to mentioned this before), but the output record numbers of status = "1" is limited to your Delegation limit (the list however can be of any size)

    With(
     {
     wStatus:
     Filter(
     Table,
     status = "1"
     )
     },
     With(
     {
     wData:
     If(
     Len(ComboBox.Selected.Value) = 0,
     wStatus,
     Ungroup(
     ForAll(
     ComboBox.SelectedItems As aSel,
     Filter(
     wStatus,
     aSel.Value in Column.Value
     )
     ),
     "Value"
     )
     )
     },
     If(
     Len(ComboBox2.Selected.Value) = 0,
     wData,
     Ungroup(
     ForAll(
     ComboBox2.SelectedItems As aSel2,
     Filter(
     wData,
     aSel2.Value in Column2.Value
     )
     ),
     "Value"
     )
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Keerthanagowsi Profile Picture
    15 on at

    Thanks again for the solution @WarrenBelz .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard