Hi @Pierrot-56 ,
Do you want to filter the nearest cities based on the selected city?
I suggest you try bing maps connector.
You could get distance value by using this connector.
I've made a similar test for your reference:
1)insert a drop down, set the drop down's Items: your list
set the drop down's value: city
2)insert a gallery,set the gallery's Items:
FirstN(Sort(
AddColumns(
listname,
"distance",
BingMaps.GetRoute(drop down1.Selected.latitude&","&drop down1.Selected.longitude,
LatitudeColumn&","&LongitudeColumn
).distanceUnit
),
distance
),5
)
Here's a issue that how to use this function for your reference:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Filtering-a-gallery-by-distance/td-p/344913
Here's a doc about bing maps connector for your reference:
https://docs.microsoft.com/en-us/connectors/bingmaps/#get-route
Best regards,