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 / How to filter items fr...
Power Apps
Answered

How to filter items from selected multiple ListBox values.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Mates,

we have requirement to apply filter with multiple values... example : from listbox select multiple item next listbox load and display values respective rows.

multipel selection2.png

When selected(clicked) on Car Then filter and display in listbox2 with LA,Calif,SW, if selected/clicked car and Bus then has to load LA,Calif,SW,TR,TS but its not loading..

let say click/selected on Bus,bike then MM,TR,TS

As of now i have two list boxes(list box 1, list box 2)

list box 1 Property : Item: Distinct(Test,Travel)

list box 2 property : Item: Sort(Distinct(Filter(Test,Travel=list box 1.Selected Text. Value),Route),Result,Ascending)

here issue is i can not get values when selected multiple values, but i can get only for one item at a time 

means as per table above 

 

Also share your idea using list box is right way or if we have any simple/better way to filter by selecting multiple items.

Help would be highly appreciated.

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to implement the following functions:

    • When a user selected select multiple selecions in list1, list2 will display all relevant options.

    Firstly , let me explain why you can only get the result of the first option.

    The key is that "list box 1.SelectedText" only quotes the value of first record.In addition, "list box 1.Selected" is the same, only quoting the first record.

    Secondly,I suggest you try "Travel in ListBox1.SelectedItems.Result".

    The key is to get all the records.

    I've made a test for your reference:

    My data source:

     

    ClearCollect(
     Test,
     {
     Travel: "Car",
     Route: "LA"
     },
     {
     Travel: "Car",
     Route: "Calif"
     },
     {
     Travel: "Car",
     Route: "SW"
     },
     {
     Travel: "Bus",
     Route: "TR"
     },
     {
     Travel: "Bus",
     Route: "TS"
     },
     {
     Travel: "Bus",
     Route: "MM"
     }
    )

     

    Add two list boxes(ListBox1,ListBox2)

    ListBox1-Items:

     

    Distinct(Test,Travel)

     

    ListBox2-Items:

     

    Sort(Distinct(Filter(Test,Travel in ListBox1.SelectedItems.Result),Route),Result,Ascending)

     

     1.jpg

    Best Regards,

    Bof

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard