Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

New row based on row in data

Davasu
6 - Meteoroid

I am looking to add new rows on some data based on the the rows already in the data. It has a column with either reversible or not reversible. If that column is reversible then I need to create a new row with the same data but the origins and destination fields reversed in the new row.

 

So in the data below row 1 is reversible so I need to add a new row to the data but with origin code replaced by the dest code and the same for the origin desc, dest code and dest desc, but the route code and desc stay the same.Row 2 is not reversible so no new row is added

 

 Origin CodeOrigin DescDest Code Dest DescRoute CodeRoute descReversible/Not reversible
1Q123PLACE1Q456PLACE2Q234ROUTE1Reversible
2Q124PLACE3Q457PLACE4Q236ROUTE2Not Reversible
NEW ROW      
3Q456PLACE2Q123PLACE1Q234ROUTE1Reversible
1 REPLY 1
Davasu
6 - Meteoroid

I think I have managed to work out a way to do this 

 

Thanks