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 / How to filter the resu...
Power Apps
Unanswered

How to filter the results in several dropdowns reading from data table

(0) ShareShare
ReportReport
Posted on by

I've got a data table which is being filtered by several dropdowns using the following code:

 

 

Filter(
 MyCollection,
 (IsBlank(dropdown1.Selected.Value) || dropdown1.Selected.Value = value1) &&
 
 (IsBlank(dropdown2.Selected.Value) || dropdown2.Selected.Value = value2) &&
 
 (IsBlank(dropdown3.Selected.Value) || dropdown3.Selected.Value = value3) &&
 
 (IsBlank(dropdown4.Selected.Value) || dropdown4.Selected.Value = value4) &&
 
 (IsBlank(dropdown5.Selected.Value) || dropdown5.Selected.Value = value5) &&

 (IsBlank(dropdown6.Selected.Value) || dropdown6.Selected.Value = value6)

 )<div> <div><span>And here is the code I'm using to get the values for the dropdown menus:<div> <li-code lang="markup">Table({fieldname: Blank()}, Distinct(MyCollection, value1))<div> <div> <div><span>My question is how can I also filter the items shown in the dropdowns so I can get a more intuitive dropdown menu, like excel, so it doesn't also show values that were already filtered out of the data table?<div> </div></span></div></div></div>

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @ecruz1 ,

    Is this what you are trying to do ?

    With(
     {
     _Data,
     Filter(
     MyCollection,
     (IsBlank(dropdown1.Selected.Value) || dropdown1.Selected.Value = value1) &&
     (IsBlank(dropdown2.Selected.Value) || dropdown2.Selected.Value = value2) &&
     (IsBlank(dropdown3.Selected.Value) || dropdown3.Selected.Value = value3) &&
     (IsBlank(dropdown4.Selected.Value) || dropdown4.Selected.Value = value4) &&
     (IsBlank(dropdown5.Selected.Value) || dropdown5.Selected.Value = value5) &&
     (IsBlank(dropdown6.Selected.Value) || dropdown6.Selected.Value = value6)
     )
     },
     Table(
     {Value: Blank()}, 
     Distinct(
     _Data, 
     value1
     )
     )
    )

     

    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

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