Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Transposing Longitude and Latitude data

Murphy_G
5 - Atom

I'm analysing dock-less vehicle data whereby one row represents one trip. Among other variables, the columns include start latitude, start longitude, end latitude and end longitude. I however need two rows per trip whereby start latitude and start longitude are in the first row and end latitude and end longitude are in the second row.

 

I've attached a png with an example of the original data structure and desired result. 

 

Is this possible with Alteryx?

 

Thanks

3 REPLIES 3
ravisharma
7 - Meteor

Hi Murphy, 

 

Solution could look this. Hope this helps. 

 

Solution Long and Lat.png

BenMoss
ACE Emeritus
ACE Emeritus
Sure this is possible, with a relatively straight forward approach...

1) transpose your data, with all 4 geographic fields set as 'data fields', this will give you four lines per original row.

2) create a field that indicates whether the field is a start or end point, this can easi I'll t be achieved by parsing the 'Name' field which is generated during the transpose process

3) create a second field which indicates whether the field Is a latitude or longitude, again this can easily be achieved by parsing the 'Name' field.

4) cross-tab your data into the desired format. The field you generated in step 3 will be your headers, and the field you created in step 2 must be included as a group by field, alongside any other detail fields you may have.

Ben
ravisharma
7 - Meteor

Hi Murphy, 

below solution. Hope this helps. 

if we consider data were coming 2 different files, it would be easier i think. 

 

Solution Long and Lat.png

Labels