cancel
Showing results for
Did you mean:
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

Accepted Solutions
Community Support Team

## Re: Coordinate distance based on ID

@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.
Community Support Team

## Re: Coordinate distance based on ID

@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.