Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have two tables in Power BI desktop called 'Centers' and 'Stores'. The 'Centers' table contains only my shopping center locations and has the columns: [CenterID], [CenterLatitude], and [CenterLongitude]. The 'Stores' table contains store locations and has the columns: [StoreID], [StoreLatitude], [StoreLongitude], and [CenterID]. The 'Centers' table has a one-to-many relationship with the 'Stores' table. Some of the stores in the 'Stores' table are located within my shopping center and will have a matching value in the [CenterID] column. The stores that have a null value in the [CenterID] column are not within my shopping centers. I want to be able to select a shopping center location and show all of the store locations that are within X miles or less of my shopping center location including my stores. How can I do this?
hi @JoeMar ,
you can calculate the perpendicular distance between two points, mentioned in the post below:
Solved: Distance Calculation in Power BI - Microsoft Fabric Community
You need Latitude and Longitude to calculate the distance between two locations with following formula:
=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon2-lon1))*6371
ps: 6371 is Earth radius in km.
You can achieve it via either Power Query or DAX method.
Or you can use Google Map API as @cs_skit suggested.
i think you could filter by this distance column to get stores in proximity ( after selecting a point)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
10 | |
6 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |