Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SeattleCrime
Helper I
Helper I

run calculation between two separate tables

Hello,

 

I've created a public report using a pubic dataset (OData URL).  I'd like to use Power BI to compare GPS coordinates of the public crime data with fixed GPS coordinates for specific properties.  I have the property GPS coordinates in a separate file that I can easily import to Power BI as a separate table, but I have no idea how to get Power BI to calculate the distances into a unique column that I can add into the data model for the crime dataset so that I can leverage those values for reporting / data visualization purposes.

 

The formula in MS Excel to calculate the distances is =ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *3958.756*5280 (= distance in feet).  An example of the output of this formula from Excel is posted as an image below.

 

I'm a complete novice with Power BI.  Your suggestions appreciated.

 

 

Thanks for your help,

Steve

 

SeattleCrime_0-1613259731926.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
lbendlin
Super User
Super User

"pubic dataset" - good one.

 

Dynamic distances in Power BI - RADACAD

@lbendlinThanks for the link.  I'll see if I can follow that.  It looks similar to what I'm doing. 

@lbendlin, do you have any solutions to offer on this question?  I'm not really sure what your reply implies.  Everything I've provided is based on public data, including the link to the City of Seattle public crime dataset which I link into PowerBI via the OData feed.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.