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 a list f record...
Power Apps
Answered

Filter a list f records using data from a sharepoint lookup column

(0) ShareShare
ReportReport
Posted on by 12

I have a Sharepoint List called "Locations" with 100 locations. This has columns including Title, Name, Code, Zip etc
I have another Sharepoint List Called "VendingMachines" with  20 Vending Machines. This has columns such as name, type, serial etc and a column called "VendingLocation" that is a lookup on the "Locations" list.

In my Canvas PowerApp I have a gallery of the "VendingMachines" which works fine.
I then put a DropDown (Or ComboBox) at the top to filter by Location. This is populated from the "Locations" List. 
That all works great.

However I'd like the DropDown (or Combo) to just be populated by the distinct locations that are in the "VendingMachines" list. So the filter will only show locations where there is actually a vending machine and not all 100 possible locations..

I've tried Choices(VendingMachines.VendingLocation).Value but that returns all 100 possible locations.

Categories:
I have the same question (0)
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @D_L_ ,

     

    You can try below formula. 

    Distinct(VendingMachines,"VendingLocation");

     

     

  • Verified answer
    D_L_ Profile Picture
    12 on at

    That doesn't work but led me to try

    Distinct(VendingMachines,VendingLocation.value)

    which did work, however at first the list was blank. needed to save and restart Power Apps to get it to properly poulate.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard