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

Trying to move headings from single lines to filling an extra column

AkisM
10 - Fireball

My input table looks like this

 

ColumnAColumnBColumnCColumnDColumnE
HeadingA[Null][Null][Null][Null]
SubheadingA[Null][Null][Null][Null]
Value A1Value B1Value C1Value D1Value E1
Value A2Value B2Value C2Value D2Value E2
HeadingB[Null][Null][Null][Null]
Value A3Value B3Value C3Value D3Value E3

 

So sometimes there's only 1 main heading, sometimes there's both a heading and a subheading. I would like to create 2 separate columns for headings and subheading, as shown below:

 

HeadingSubheadingColumnAColumnBColumnCColumnDColumnE
HeadingA[Null][Null][Null][Null][Null][Null]
HeadingASubheadingA[Null][Null][Null][Null][Null]
HeadingASubheadingAValue A1Value B1Value C1Value D1Value E1
HeadingASubheadingAValue A2Value B2Value C2Value D2Value E2
HeadingB[Null][Null][Null][Null][Null][Null]
HeadingB[Null]Value A3Value B3Value C3Value D3Value E3

 

There is a large number of headings/subheadings with data following them. Any ideas how to achieve the above transformation? I feel like it is simple but can't quite point my finger to it without some complex multi-row formulas.

4 REPLIES 4
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @AkisM,

 

I believe this is what you're trying to achieve?

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

AkisM
10 - Fireball

@Jonathan-Sherman Hi, not quite. Value A is lost in the workflow above. All values must be kept intact, as shown in Table 2 in my original post.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @AkisM,

 

In that case i've made a small change, I think this is now what you're trying to achieve?

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached an updated workflow for you to download if needed.

 

Regards,

Jonathan

AkisM
10 - Fireball

Hi @Jonathan-Sherman , not exactly, because the headings/subheadings can be any word, not those words specifically. So using those words as flags won't work. But I get the point of the workflow now, I will just use isNull on the value columns as the flag and it should work fine. Thanks for your help.

Labels
Top Solution Authors