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 / Filter the gallery wit...
Power Apps
Unanswered

Filter the gallery with dropdown box to show all data or only selected numbers

(0) ShareShare
ReportReport
Posted on by 158

Hi, 

I am beginner in PowerApps and just creating my 2nd App now. I have added a dropdown box which shows me values from the gallery. My question is how I can add a blank row in dropdown box or row with option "All" values so the gallery shows me all rows and not only selected from dropdown box, please?  

 

Thanks!

Categories:
I have the same question (0)
  • Jasir Qadri Profile Picture
    36 on at

    Go to Dropdown ,items and put [blank(),"ALL","Value","Value"] and other dropwdown values which you want to show.

  • MP-13011217-0 Profile Picture
    158 on at

    Thank You for a quick reply. I already have one command there which is: Distinct(Table5, 'PART NUMBER'). How do I apply Your code to that, please? 

  • Jasir Qadri Profile Picture
    36 on at

    You have to create the collection and store the fields in that and then apply  

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @marcy_pi,

    Do you want to display all the records if you select "All" option from the dropdown?

    First of all, add the "All" option to the dropdown list. To achieve this, you should create a collection to add the All option, you could create the collection clicking a button or set the OnVisible of the current screen:

    ClearCollect(colPartNumber,{Result:"All"},Distinct(Table5, 'PART NUMBER'))

    Then populate the dropdown part number with the colPartNumber, there will exist "All".

    Set the Items property of the Gallery as below:

    If(Dropdown_PartNumber.Selected.Result="All",Table5,Filter(Table5,'Part Number'=Dropdown_PartNumber.Selected.Result))
  • MP-13011217-0 Profile Picture
    158 on at

    Thank You very much! Now it is not showing any error but also not showing any data in my gallery and dropdown box... any idea why? 

  • MP-13011217-0 Profile Picture
    158 on at

    Hi, sorry I just tried it but also added another line onVisible: Collect(colPartNumber, Distinct(Table5, 'PART NUMBER')), then saved, published and closed app. I opened it and it's working! 🙂 thank You for Your response was really helpful! 

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard