Forum Discussion

SeattleCrime's avatar
SeattleCrime
Helper I
5 years ago
Solved

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

 

 

3 Replies

    • SeattleCrime's avatar
      SeattleCrime
      Helper I

      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.