Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Clean up multi-header row and transpose columns

Simon2902
6 - Meteoroid

Hi all

 

I am dealing with a messy data set that has multiple header rows. The top two rows are useless and can be removed. The next three header rows need to be reorganised to display the data more intelligibly. Below the input format:

 

Simon2902_0-1595719418129.png

 

I would like to know how best to undertake the following steps: a) concatenate the metrics (rows 4-5); b) remove the unnecessary "Overall Result" row (that one is fairly easy, filtered it so far); c) transpose the metrics into a new, single column; d) show the metric values in one column per period (i.e. Overall Result, JUL 2017, JUN 2017, etc.).

 

Ideal output format is shown below and also attached. In my curreny workflow attemps I split out the header rows, concatenated them and then join them back with the data rows. I though that transposing would be next natural step but given that each period (e.g. JUL 2017) appears multiple times, I receive multiple data columns (JUL 2017_1).

 

NameAgeSegmentMetricOverall ResultJUL 2017JUN 2017
Name 133Segment APay, GBP k79.75.55
Name 133Segment ARevenue, GBP k965200100
Name 133Segment AHours worked, h3,800160125
Name 133Segment AHeadcount
Avg FTE
1.01.01.0
Name 222Segment BPay, GBP k94.57.04.5
Name 222Segment BRevenue, GBP k355150120
Name 222Segment BHours worked, h2,800150140
Name 222Segment BHeadcount
Avg FTE
1.01.01.0

 

Thanks!

 

 

 

2 REPLIES 2
bpatel
Alteryx
Alteryx

hi @Simon2902 ,

 

a little bit of everything involved to get to the end result but i hope this helps!

 

bpatel_0-1595870608706.png

 

Simon2902
6 - Meteoroid

Thanks @bpatel, I developed a (similar) solution in the meantime but yours works very well. Accepted as solution!

Labels