Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Data Layout

kw7669
5 - Atom

Hello. I am trying to format my data a certain way but not having much luck. Currently I have data that looks like the following:

 

CompCode    TradePartner    Amt
2140               T7320              5.55
2140               T7980              4.03
7320               T2140              7.33
7980               T2140              1.29

 

And I need to transform it to look like this 

 

CompCode1   TradePartner1   CompCode2   TradePartner2   Amt1   Amt2   Variance
2140                T7320               7320                T2140               5.55    7.33     -1.78
2140                T7980               7980                T2140               4.03    1.29      2.74

 

Essentially I need to see the CompCode and TradePartner and then the opposite, where the TradeParter and CompCode are reversed on the same line. Hope that makes sense. Any help would be greatly appreciated. Thanks

2 REPLIES 2
mmish
6 - Meteoroid

You should be able to create the additional columns and join the data to itself:

 

mmish_0-1622146332731.png

 

kw7669
5 - Atom

Thank you so much. 

Labels