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 / Filter function on mul...
Power Apps
Answered

Filter function on multiple choice lists and Combobox

(2) ShareShare
ReportReport
Posted on by 40
Hi,
 
Been working with PowerApps for a few days. The simple tasks of filtering with a text search box and radiobox filter worked. Below my current (working) formula.
 
Filter(
    Search(
        'Overview hydrocolloids';
        SearchInput1.Text;
        Type;
        Modification
    );
    'Gel formation' = Radio1.Selected.Value || IsBlank(Radio1.Selected.Value)
)
 
Now, I'm trying to make a filter with a Combobox. In my data source table I have a choice list (with text)
which allows (and contains) multiple choices. See below:a picture below
 
     
Now for the Combobox I used Choices('Structure choice') to express that I want to use the choices from that
choice list as my choices for the Combobox.
In the Combobox I want to allow multiple choice. 
 
Problem/question
I want to filter my data with the search bar and/or with the filters. The rows represent hydrocolloids 
When I select the structure choices in the Combobox I want the filter show me the following: I want to
see all results that contain at least my structure choices.
So for example: I filter on "elastic gel" I want to see all Hydrocolloids (Results) that contain
"elastic gel". When I filter for "elastic gel" and "low viscous" I want to see all Hydrocolloids that
contain this combination of structures and they may also contain other structures not filtered on.
 
I have been trying to include that in my formula, but whatever I try I keep getting errors.
Below you can find 2 examples of formulas that didn't work. 
 
Filter(
    'Overview hydrocolloids';
    Or(
        IsBlank(ComboboxCanvas1.SelectedItems);
        IsEmpty(ComboboxCanvas1.SelectedItems);
        CountRows(
            ComboboxCanvas1.SelectedItems
        ) = CountRows(
            Filter(
                'Structure choice';
                Value in ComboboxCanvas1.SelectedItems.Value
            )
        )
    )
)
The error gives an invalid argument type at Value
 
Filter(
    'Overview hydrocolloids';
    Or(
        IsBlank(ComboboxCanvas1.SelectedItems);
        IsEmpty(ComboboxCanvas1.SelectedItems);
        ForAll(
            ComboboxCanvas1.SelectedItems;
            ThisRecord.Value in 'Structure choice'
        )
    )
)
At ThisRecord "invalid argument type, a boolean value is expected" and "a text is expected at
the position of the formula"
 
Working on it for hours but every solution gives an error. Also can't seem to find a video that explains
how to work with the "double multiple choice" Can someone please help? Thank you so much!
 
ps in my language version the ; is used instead of , 
pps I tried to give as much important information as possible. If you need more, let me know
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,866 Moderator on at
    This explanation may provide some insight on how multiple selection works as it produces an array of values not a single value as you are trying to use.
     

    Filtering a Gallery or DataTable of Data Using a ComboBox with Multiple Selections

    I have a method that I was playing with using a Job Description table and filtering by department which is a choice selection in Dataverse, I would not recommend using this for large data sets.
     
    I created a combo box, with "allow multiple selection" on, and set its Items property to 
     
    Choices('Job Descriptions'.Department)
     
     
    I then set the OnChange property of the ComboBox to 
     
    ClearCollect (
        testViewSelected,
        Filter(
            'Job Descriptions',
            Department = ComboboxCanvas3.Selected.Value
        )
    );
     
    Clear(testViewSelected);
     
    ForAll(
        ComboboxCanvas3.SelectedItems,
     
        Collect(testViewSelected, Filter(
            'Job Descriptions',
            Department = Value)
        )
    );
     
     
    The first ClearCollect is used to create the Collection format. No, it doesn't have to be in the OnChange but I was only testing the feasibility of the approach.
    The collection has to be cleared using the Clear because the collection is built by iterating the selected departments and adding to the collection.
    The Collect creates the collection by filtering for each department.
     
    I used a DataTable to display the data by setting the items to testViewSelected.
     
    I saw a bunch of weird behaviour at first where the items property of the DataTable didn't recognize the collection name until after a second or two. No data was being retrieved for the columns when I viewed the collection until I specified the columns in the DataTable. I also tested it with a gallery.
     

    OR
    With(
        {optionCount: CountRows(ComboboxCanvas3_1.SelectedItems)},
        Switch(
            optionCount,
            0,
            'Job Descriptions',
            1,
            Filter('Job Descriptions', Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value),
            2,
            Filter('Job Descriptions', Or(Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 2).Value)),
            3,
            Filter('Job Descriptions', Or(Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 2).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 3).Value))

        )
    )
     
  • MD-08041325-0 Profile Picture
    40 on at
    Thank you for your reply @ronaldwalcott

    Unfortunately, it's not really clear to me yet. I have the double multiple choice, so choice list with multiple choice in my data table, and I want to allow the filtering with a Combobox that has multiple choice. How do I translate the array of values in my formula instead of the single value I'm trying to use? 
  • w.p Profile Picture
    8,345 Super User 2026 Season 1 on at
  • w.p Profile Picture
    8,345 Super User 2026 Season 1 on at
    Are you able to reformat your posting, it's hard to read.
     
  • MD-08041325-0 Profile Picture
    40 on at
    @w.p thank you for your reply. I reformatted it to fit the page better. Maybe they need to write some code so the post will be automatically formatted to fit the page ;) 
     
    Thanks for sending me the video. Reza is amazing and helped me many times, but unfortunately in this video he works with a choice list that that contain single choices, and not multiple choice answers. With his explanation I cannot solve the double multiple-choice code issue (as someone pointed out that value does not work as I do not have a single value)
     
    I would love to keep the multiple-choice Choicelist in my data table, as it perfectly summarizes the data I'm describing, and I hoped it would not be impossible to code. Still have good hopes that some wizard might help me solve it, but otherwise I'll work with Resa and split that multiple-choice Choicelist in 3 seperate lists so each column will give me a single value
  • stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    Did you try this before ?
    Filter(
        'Overview hydrocolloids';
        Or(
            IsBlank(ComboboxCanvas1.SelectedItems);
            IsEmpty(ComboboxCanvas1.SelectedItems);
            CountRows(
                ComboboxCanvas1.SelectedItems
            ) = CountRows(
                Filter(
                    'Structure choice';
                    Value in ShowColumns(ComboboxCanvas1.SelectedItems.Value)
                )
            )
        )
    )
  • MD-08041325-0 Profile Picture
    40 on at
    @stampcoin I just filled in your suggestions and it gives the following errors:
     
    Value: is not recognised
    2nd filter 'structure choice': unvalid argumenttype
    ShowColumns: Invalid number of arguments: 1 received, 2 or more expected.
  • Verified answer
    ronaldwalcott Profile Picture
    3,866 Moderator on at
    Sorry, I was just providing some insight so let me see if I can explain the challenge from my point of view and a possible approach.
     
    The challenge is that you are selecting records from a table by comparing the items in a table (the choice list) with items in another table (the selected items).
    Filter does not allow table comparisons in this manner and it is not natively supported by Dataverse, yet, so most approaches can result in some type of delegation issue.
     
    One way to approach this is to create a new column in your table.
    This table will contain the choice items in a string so you will have to update your entry and screen to create this value when changes are made to the choice list.
     
    You can now use this text column to compare with the selected items table, but you still have a possible delegation issue.
     
    So, you would then create the equivalent to this
     
    With(
        {optionCount: CountRows(ComboboxCanvas3_1.SelectedItems)},
        Switch(
            optionCount,
            0,
            'Job Descriptions',
            1,
            Filter('Job Descriptions', Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value),
            2,
            Filter('Job Descriptions', Or(Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 2).Value)),
            3,
            Filter('Job Descriptions', Or(Department = Index(ComboboxCanvas3_1.SelectedItems, 1).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 2).Value, Department = Index(ComboboxCanvas3_1.SelectedItems, 3).Value))

        )
    )
     
    using
     
    Filter ( Index(ComboboxCanvas3_1.SelectedItems, 1).Value) In theTextColumnContainingTheChoiceList
     
    and create your filter statement with And instead of the Or in this example.
     
    If delegation is going to be a problem then there are some more complex approaches.
    I have not tested this but I believe it can work.
  • Suggested answer
    MD-08041325-0 Profile Picture
    40 on at
    @ronaldwalcott thank you for taking the time to write such an extensive explanation. Much appreciated!!
     
    So what I'm understanding from your reply is that what I'm trying to do is practically impossible and I should simplify it if I want to be able to filter my data. I was already leaning to that, as I was getting frustrated that it wasn't working, but wanted to know if there would be a solution for this as it would be so elegant to capture it this way. 
     
    Thank you, I'll start on the different approach!
  • Verified answer
    w.p Profile Picture
    8,345 Super User 2026 Season 1 on at
    Found a couple of links related to the Multi-Select Combo Box.
    using the hide item technique by Reza https://www.youtube.com/watch?v=44j2VRbdWjk
    Using an additional column by Darren Neese https://youtu.be/x5ZTFBq1Hpc

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard