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

Alteryx Designer Desktop Discussions

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

Multiple Headers within data set

thrnma
7 - Meteor

Hello,

 

My data looks like the below

 

Birmingham

31-01-2021
29-01-2021
London
28-01-2021
27-01-2021

 

I would like the data to look like

Birmingham

31-01-2021
Birmingham29-01-2021
London28-01-2021
London27-01-2021

 

Essentially using the headers as a new columns associated to each date within its section. I can think how to do it manually, but how would I replicate this in Alteryx. I'm looking at thousands of lines from about 40 cities, and will be doing this monthly. Thank you in advance!

 

Matt

2 REPLIES 2
thrnma
7 - Meteor

I used a formula to create a new field

thrnma_0-1619176574549.png

This made the data set look like the below:

Birmingham

Birmingham
 31-01-2021
 29-01-2021
LondonLondon
 28-01-2021
 29-01-2021

 

Then, I used the link below, tweaking the formula to be looking for blanks ([Port] = '' instead of IsNull([Port]) as I had used a data cleansing tool to which made them blank, not null)

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-fill-down-with-last-non-null-va...

 

and this gave me the output of

 

Birmingham

Birmingham

Birmingham

31-01-2021
Birmingham29-01-2021
LondonLondon
London28-01-2021
London29-01-2021
messi007
15 - Aurora
15 - Aurora

@thrnma,

 

Please see below:

 

messi007_0-1619176861640.png

Attached the workflow,

If this solve the need please mark it as solved. It will help others.

 

Regards,

Labels
Top Solution Authors