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

Populating empty columns

peterg97
7 - Meteor

Hi All, 

 

I am trying to populate a column using an IF function, but not sure how to do it. Basically, I want use an IF function to check if a row in a column is null, and if it is, I want to replace it with the first 4 characters of a different row. I've attached an example to help visualise (For the rows that are Null, I want the first 4 letters ie 2017, 2018 and 2011 to populate the year column):

peterg97_0-1610014822207.png

 

Any help would be appreciated.

 

Hope everyone had a good New Years!

 

Cheers!

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@peterg97 
Something like this?

0107- peterg97.PNG

Emil_Kos
17 - Castor
17 - Castor

Hi @peterg97,

 

This is the formula that you need to use:

 

IIF(IsNull([Year]), ToNumber(Left([Order], 4)) , [Year])

 

My output:

Emil_Kos_0-1610015458664.png

 

 

peterg97
7 - Meteor

Hi @Qiu 

 

Thanks, this works perfectly! Appreciate the help. 

 

Kind Regards, 

Peter. 

peterg97
7 - Meteor

Hi @emil 

 

Thanks! Appreciate the help!

 

Kind Regards, 

Peter. 

Qiu
21 - Polaris
21 - Polaris

@peterg97 

Thank you for the accept mark also

Labels
Top Solution Authors