Alteryx Designer Desktop Discussions

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

Populate column with conditional values

Ciaran
6 - Meteoroid

Hey guys,

 

Feel like this should be simple but haven't been able to make it work for me. Have a single column of data:

Column A
Title 1
data
data2
data3
Title 2
data4
data5
Title 3
data 6
data 7
data 8 
data 9

And I want to take the Title and insert as a second column beside each data, like so:

Column AColumn B
Title 1Title 1
dataTitle 1
data2Title 1
data3Title 1
Title 2Title 2
data4Title 2
data5Title 2
Title 3Title 3
data 6Title 3
data 7Title 3
data 8 Title 3
data 9Title 3

 

Appreciate any help. Thanks.

4 REPLIES 4
Nick-C
Alteryx
Alteryx

Hey @Ciaran ,

 

Looks like a multi-row formula is what you're after, something like this should work:

IF
STartsWith([Col A],"Title") THEN [Col A]
ELSE [Row-1:New Field]
ENDIF

 

In the config make sure you're setting it as a string field! 

NickC_1-1658505299227.png

 

 

Please remember to accept as a solution if this works! 

 

Emmanuel_G
13 - Pulsar

Hi @Ciaran ,

 

One way to do it easily

Emmanuel_G_0-1658521016649.png

 

binuacs
20 - Arcturus

@Ciaran Another way of doing this

binuacs_0-1658558355809.png

 

Ciaran
6 - Meteoroid

Thanks Nick, that worked perfectly for me!

Labels