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 Gallery based o...
Power Apps
Answered

Filter Gallery based on Distinct list with 'All' option. Either the list contents show or ALL shows, but not both. trying to troubleshoot.

(0) ShareShare
ReportReport
Posted on by 100

I am trying to filter a gallery based on a Distinct column from a SharePoint list and give it an 'ALL' option. But Either 'ALL' or the Rooms list shows, but not both. 

 

Dropdown4: Items. 

 

Ungroup(
 Table(
 {Options: (Sort(Distinct(Trn1_ExpenseMaster, Room), Result, Ascending))}
 //{Options: Table({Value: "ALL"})}
 ),"Options"
)

 

 

With this Code, 'ALL' option is not showing. 

PBInonpro_2-1677934221161.png

 If I switch the code where 'ALL' is the first line of the Table, then 'ALL' will show but the Rooms are blank. 

 

PBInonpro_0-1677934052360.png

But if '//' the line with the 'ALL' code, then all Rooms will show. 

PBInonpro_1-1677934141442.png

 

Not sure what the issue is to show ALL and all rooms for selction. 

 

For reference, here is the MasterGallery: Item.:

 

 

Filter(Trn1_ExpenseMaster, Room = Dropdown4.SelectedText.Value)

 

 

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @PBInonpro

    Dropdown4 Items:

    Ungroup(
     Table(
     {Options: Table({Result: "All"})},
     {
     Options: Sort(
     Distinct(
     Tm1_ExpenseMaster,
     Room
     ),
     Result
     )
     }
     ),
     "Options"
    )

     

    Gallery: 

    Filter(Trn1_ExpenseMaster, Dropdown4.Selected.Result ="ALL" || Room = Dropdown4.Selected.Result) 

  • PBInonpro Profile Picture
    100 on at

    Thanks, do you have any good books or references to learn Power Apps? What is your process of development? 

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard