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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
elc
Regular Visitor

Coordinate distance based on ID

I have three coordinates sets, one GPS and two based on an experimental triangulation algorithm and need to find the difference between the GPS measurement and the two triangulation measurements in meters. One column for longitude, one for lattitude, and an ID column. The ID column is made based on the time of the measurement, and is used to determine which longitudes and latitudes belong together. I have made a small ascii table to demonstrate.

  ID    LAT   LON    METHOD

|  1  |  X   |     Y    |    GPS

|  2  |  X2 |     Y2  |    GPS

|  1  |  X3 |     Y3  |    ALG 1

|  1  |  X4 |     Y4  |    ALG 2

|  2  |  X5 |     Y5  |    ALG 1

|  2  |  X6 |     Y6  |    ALG 2

 

I need to calculate the distance between (X,Y), and (X3,Y3), and (X4,Y4), with the same done for the coordinates with ID 2,3,4..n, where n = the number of measurements done.

 

Can I somehow merge all the values attached to the same ID into a single row? In the above example make it look like the following:

  ID  LAT1   LON1    LAT2    LON2   LAT3   LON3

|  1  |  X   |     Y       |   X3   |     Y3   |    X4  |    Y4

|  2  |  X2 |     Y2     |   X5   |     Y5   |    X6  |    Y6

 

Where LAT1 and LON1 refers to GPS, 2 refers to ALG1 and 3 refers to ALG2.

Thanks in advance for the help!

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@elc ,

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Multiple-Rows-into-Multiple-Columns/td-p/543527

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@elc ,

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Multiple-Rows-into-Multiple-Columns/td-p/543527

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.