Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

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

nic_hamley
7 - 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!

4 REPLIES 4
echuong1
Alteryx Alumni (Retired)

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. 

nic_hamley
7 - 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).

TonyA
Alteryx Alumni (Retired)

Here's one way to do it. 

 

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

nic_hamley
7 - Meteor

Thanks Tony, that worked beautifully!

Labels