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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dynamic Filtering for ...
Power Apps
Unanswered

Dynamic Filtering for Multiple Controls

(0) ShareShare
ReportReport
Posted on by 99

Hi everyone,

 

I have 2 List controls (List A, List B) and I need to filter the contents of List B based on items selected in List A. User can select multiple items in List A. How can I filter these multiple items to display the necessary content in List B?

 

List A:

CatA

CatB

CatC

 

List B:

ItemA - CatA

ItemB - CatB

ItemC - CatA

ItemD - CatD

 

User selects: CatA and CatB

 

Result in List B should be: ItemA, ItemC, ItemB.

 

Thanks!

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @keihimekawa 
    Are you using the ListBox control?

     

    My assumption here is the data in your list are all single line text.  The generic code is like this:

     

    Filter(
     your_listb_datasource_name
     ListA.SelectedItems.Value in ItemColumnNameB
    ) 

     

     

    But if you need more detailed instructions it will be necessary to share further information about your data populating ListA & ListB:

     

    • What datasource (SharePoint? Excel?, etc)
    • What are the column names?
    • What are the data types?

     

    ---
    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."

  • eka24 Profile Picture
    20,923 on at

    Watch this video
    https://youtu.be/44j2VRbdWjk

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • keihimekawa Profile Picture
    99 on at

    Hi @mdevaney . I am using a listbox control. To answer your questions:

    • What datasource (SharePoint? Excel?, etc) - Sharepoint
    • What are the column names? - Item (ListA) and Brand (ListB)
    • What are the data types? Do you mean in SP? They're all choices datatype in SP

    I tried using the formula you provided but I'm not getting the ".Value" option after SelectedItems. 

    Am I doing something wrong?

  • mdevaney Profile Picture
    29,989 Moderator on at

    @keihimekawa 

    Ok, to make sure I understand: do you have 2 SharePoint lists that look like this?

     

    List A:

     

    Item
    ItemA
    ItemB
    ItemC
    ItemD

     

     

    List B:

     

    Item Brand
    ItemA CatA
    ItemB CatB
    ItemC CatA
    ItemD CatD

     

  • keihimekawa Profile Picture
    99 on at

    @mdevaneymy apologies. it should be the other way around. ListA would be the Brands and ListB would be the Items

     

    List A - user will select from this first. Multi-selection allowed.

    Brand
    CatA
    CatB
    CatC
    CatD

     

    List B:

    ItemBrand
    ItemACatA
    ItemBCatB
    ItemCCatA
    ItemDCatD

     

    Sorry I'm a bit all over the place. I've been trying to work this out for the whole day T__T

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @keihimekawa 
    I think this is the code you will want to use in the Items property of List B

    Filter(
     SharePointListB,
     Brand in ListBox_A.SelectedItems.Brand
    )

     

    If you get an error please share a screenshot.

     

    ---
    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."

  • keihimekawa Profile Picture
    99 on at

    Alright. I feel idiotic now. Of course that made sense! Thanks for pointing this out. I finally got it to work. Now a few more list boxes T_T I have around 8 listboxes with dependencies.

     

    Sorry, since I'm already here. Do you have any idea on the maximum number of items displayed in a listbox? We have a list with 2K records and I just noticed not all items are being displayed (which makes sense).

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard