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
Unanswered

Filter Gallery based off of Bing Maps distance calculation which is housed in the Gallery for each row

(0) ShareShare
ReportReport
Posted on by

I am still fairly new to Power Apps and need some guidance.

 

I am creating a canvas application that takes a user's address inputs and creates a collection. This collection allows me to utilize the Bing Maps "Get Route" function and calculate the distance between the collection address and the gallery's vendor locations (data set is 20k+ rows so I have to avoid delegation). The vendor gallery should be filtered by the product gallery first and then by the distance <= radius. I also need the gallery to be sorted by the distance (smallest to largest). I am utilizing a dropdown for the radius values outside of the vendor gallery and the distance is calculated and shown within the gallery for each vendor with no ties to a table. The vendor data is connected to a Dataverse table. the current formula for the vendor gallery items is as follows:

 

Gallery Items Formula

SortByColumns(
Search(
'STEERAGE Data', Local_ProductGallery.Selected.'PRODUCT NUMBER',
"productnumber"
),"vendortier",Ascending,"avgtotalcost")
 
Calculated field (Distance)
If(IsEmpty(PatientAddress), 0 ,
RoundUp(BingMaps.GetRoute(First(PatientAddress).point.coordinates.combined,BingMaps.GetLocationByAddress({addressLine:ThisItem.ADDRESS_LINE1,locality:ThisItem.CITY,adminDistrict:ThisItem.STATE,postalCode:ThisItem.ZIP}).point.coordinates.combined,{distanceUnit:"Mile",travelMode:"Driving"}).travelDistance,0))
Categories:

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard