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

Transpose Data

goutdelete
8 - Asteroid

Hi everyone!

 

I have some data like this in sheet1, essentially I need to re-arrange the data into something like this (in sheet2):

 

Asset Class2021 Q32021 Q42022 Q12022 Q22021 Q32021 Q42022 Q12022 Q22021 Q32021 Q42022 Q12022 Q2
 PD_S1   PD_S2   PD_S3   
10.0002470.0002860.0001390.0001140.000260.00030.0001430.000132    
20.0040460.0045380.0025570.0021810.004210.0047180.0026190.002461    
30.0280580.0306680.0196180.0173170.0289370.0316040.0199920.019039    
40.0346330.0377340.024520.0217350.0356780.0388420.0249710.023819    
50.0356570.0388320.0252890.0224310.0367270.0399670.0257520.02457    
60.0468870.0508420.0338210.0301710.0482220.052250.034410.032905    
70.0750490.0807390.0558330.050330.0769760.0827540.0567140.054459    
80.1201160.1281180.0924250.0842750.1228350.130930.093720.0904    
90.1963650.2073620.1571490.1452210.2001170.2111960.1590280.154203    
100.1963650.2073620.1571490.1452210.2001170.2111960.1590280.154203    

 

I feel transpose may be the answer but so far I haven't had any luck.  The result is just not what I wanted.  I suppose it's not a traditional "transpose" either, basically every 10 records is a set of assets (let's just call it 1 to 10), and the value changes each period under each environment scenatio.  I would like to get the assets 1-10 as row and all the values append in columns.

 

Anyone might be able to help me out please? 🙏

 

Thanks a million!

2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @goutdelete 

 

I can easily spot one issue that you are going to have if you get the data in the format shown in your post above and that is that the column headers are the same. In AlteAryx this is not possible. As an alternative, in the attached workflow I have included each environment scenario in the column headers

 

AngelosPachis_0-1637092951947.png

 

Hope that helps,

Angelos

goutdelete
8 - Asteroid

@AngelosPachis 

 

Thanks so much!!  We were rather close but when we tried the crosstab tool somehow neither my coworker nor I got the correct result.  I suppose we need to study cross tab tool more 😂

Labels