Alteryx designer Discussions

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

Replacing a null in a field by looking up a previous field and replacing with that value

Highlighted
Meteor

Hi there,

 

I have a field that has some nulls (due to parsing). I want to replace the nulls by looking up the field to the left of it and returning what that field has to replace the null. Does anyone know how I might do that? See below - I want to replace the [Nulls] in rows 4 a

 

Staff Grade CodeStaff Grade
61Accountant I
51Senior Accountant I
41Manager I
61[Null]
61[Null]
51Senior Accountant I
51Senior Accountant I

 

Thanks!

Highlighted
Alteryx
Alteryx

You can achieve this using a formula tool and a conditional statement. Essentially, check to see if staff grade is null, if it is then use the value from staff grade code, else use the staff grade. See attached. Let me know if this is what you're looking for. 

Highlighted
Meteor

That's not quite what I had in mind - where null in the Staff Grade column, I want to look up the code next to that in the Staff Grade Code column and replace the null with the matching Staff Grade. In other words, I want to replace the nulls for 61 with Accountant I (as shown in row 1).

Highlighted
Alteryx
Alteryx

Here's one way to do it. 

 

2019-11-07_21-58-24.png

Highlighted
Meteor

Thanks Tony, that worked beautifully!

Labels