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

Alteryx Designer Desktop Discussions

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

Switch Data Format

AB
5 - Atom

Hi Guys,

 

I'm trying to switch this data in Excel, but I'm struggling to get the workflow to work with the code and product on top of each other.

Any help would be greatly appreciated.

 

Before

 

CodeProduct DateValue
LN02Aluminium03/01/2022 00:000.744549191
FJ05Apple Juice03/01/2022 00:000.762109903
BF01Barley03/01/2022 00:000.181152901
WB04Brent03/01/2022 00:000.416847321
LZ19Butter03/01/2022 00:000.780580126
JS15Butter03/01/2022 00:000.733557867
LU27Canola Oil03/01/2022 00:000.044035755
LU26Canola Oil03/01/2022 00:000.58556832
MF39Cattle03/01/2022 00:000.067977681
AX05Cattle03/01/2022 00:000.125161893
CCUSCheese- Cheddar03/01/2022 00:000.387598973
LZ20Cheese- Cheddar03/01/2022 00:000.734070963
DI19Cheese- Cheddar03/01/2022 00:000.770647279
VN26Chicken03/01/2022 00:000.418725165
BY18Chicken03/01/2022 00:000.706556491
DC04Cocoa (Ghana)03/01/2022 00:000.5876491
COCLCocoa Beans03/01/2022 00:000.669335046
COCLCocoa butter03/01/2022 00:000.26073979
COBLCocoa butter03/01/2022 00:000.261633541
LN02Aluminium04/01/2022 00:000.051229094
FJ05Apple Juice04/01/2022 00:000.002016564
BF01Barley04/01/2022 00:000.228483032
WB04Brent04/01/2022 00:000.223786858
LZ19Butter04/01/2022 00:000.626497249
JS15Butter04/01/2022 00:000.45899138
LU27Canola Oil04/01/2022 00:000.00064558
LU26Canola Oil04/01/2022 00:000.537484159
MF39Cattle04/01/2022 00:000.480355367
AX05Cattle04/01/2022 00:000.823845387
CCUSCheese- Cheddar04/01/2022 00:000.590557947
LZ20Cheese- Cheddar04/01/2022 00:000.033556336
DI19Cheese- Cheddar04/01/2022 00:000.529863335
VN26Chicken04/01/2022 00:000.876292911
BY18Chicken04/01/2022 00:000.344771108
DC04Cocoa (Ghana)04/01/2022 00:000.699635345
COCLCocoa Beans04/01/2022 00:000.905661001
COCLCocoa butter04/01/2022 00:000.016724226
COBLCocoa butter04/01/2022 00:000.439979068

 

After 

 

 LN02FJ05BF01WB04LZ19JS15LU27LU26MF39AX05CCUSLZ20DI19VN26BY18DC04COCLCOCLCOBL
 AluminiumApple JuiceBarleyBrentButterButterCanola OilCanola OilCattleCattleCheese- CheddarCheese- CheddarCheese- CheddarChickenChickenCocoa (Ghana)Cocoa BeansCocoa butterCocoa butter
03/01/2022 0.3811860.330580.2901930.3062730.8558940.6561160.3446750.301480.4281430.5253060.5213970.5498650.237330.2524110.602210.0158050.5710810.1959550.437387
04/01/2022 00:000.476010.7573490.9685510.0581910.4832740.8758180.5872610.1694810.3366520.8599640.8674850.9200780.6411080.3314860.6769730.1384550.495980.4620840.776179
2 REPLIES 2
Carolyn
12 - Quasar
12 - Quasar

Give this a try! What I did:

 

  1. Use a Cross Tab with just the Code & Product
  2. Use a Cross Tab with just the Code & Value
  3. Union them together
  4. Select to move the Date column to the beginning

 

Step #1: 

2024-11-25_10-54-17.png

Step #2: 

2024-11-25_10-54-28.png

 

Final Result: 

2024-11-25_10-53-53.png

binuacs
21 - Polaris

@AB what is the logic to calculate the below values, it is actually different from the input values

image.png

Labels