Alteryx Designer Desktop Discussions

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

Breaking data out from a Column to Rows

Cidney
5 - Atom

Hello all - New here. 

 

I am am in need of breaking a couple columns out into rows. For example: My output is currently ledger year, ledger quarter, sum_actual activity.

 

However, I am trying to break it out to look like the green. Ledger year with the corresponding quarters listed as rows. 

Alteryx Community.PNG

 

Thanks!

2 REPLIES 2
binuacs
20 - Arcturus

@Cidney You can use the cross tab to achieve the result. Attaching a sample workflow for your reference 

 

binuacs_0-1661784800760.png

 

AngelosPachis
16 - Nebula

Hi @Cidney,


If you want to convert your input to the exact output format then you will hit certain barriers that you will have to find a way to overcome. One of them is that column headers in Alteryx should be distinct, so two columns cannot have the same name. In your example, your headers in your output are named as "Ledger Year 2018" for the first column and the same happens for the second one and so on. We can tell that these columns are different by looking at the second row (Quarter) but Alteryx can't do that so to keep the distinct naming convention mention above, if you try to have "Ledger Year 2018" appear twice as your column header it will rename the different headers to "Ledger Year 20181", "Ledger Year 20182" and so on..

 

The way to go around this is to find the distinct combinations of ledger year and quarter in your dataset and assign them a general naming convention, like F1 for the first column, F2 for the second one etc. Then you will be able to have your ledger year and quarter appearing in different columns but now Alteryx will not rename them as they will not be part of the headers but rather part of the data table.

 

AngelosPachis_0-1661785740062.png

 

I've mocked up a sample workflow for you to investigate further. From your attached screenshot, it seems you will need another dimensions in your initial dataset to differentiate inputs from outputs and other rows (C,D,E,F).

 

Hope that helps,

Angelos

Labels