Alteryx Designer Desktop Discussions

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

Help with how to fill nulls

ydklyfe
6 - Meteoroid

So I'm trying to run a logic code, that fills nulls. The SEAL is same the same for all counties.  My logic code below works for US and HK, however I'm still seeing nulls for IND and LUX. Can you please help? 

 

 

IF IsNull([US SEAL])

THEN [HK SEAL]

ELSEIF IsNull([US SEAL]) AND IsNull([HK SEAL])

THEN [IND SEAL]

ELSEIF IsNull([US SEAL]) AND IsNull([HK SEAL]) AND IsNull([IND SEAL])

THEN [LUX SEAL]

ELSEIF IsNull([US SEAL]) AND IsNull([HK SEAL]) AND IsNull([IND SEAL]) AND IsNull([LUX SEAL])

THEN 0

ELSE [US SEAL]

ENDIF

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @ydklyfe,

Do you have any example data to test your formula on?

IraWatt
17 - Castor
17 - Castor

@ydklyfe Not sure how your data is structured but here is one idea for filling in the blanks dynamically:

IraWatt_0-1654621936413.png

 

tkong
7 - Meteor

Do try @IraWatt suggestion, but if you are building nestedif, would it be better to list out the most specific first?  Like 

IsNull([US SEAL]) AND IsNull([HK SEAL]) AND IsNull([IND SEAL]) AND IsNull([LUX SEAL]) first, then  

IsNull([US SEAL]) AND IsNull([HK SEAL]) AND IsNull([IND SEAL])

and so on?

ydklyfe
6 - Meteoroid

I will upload a dummy data soon. 

ydklyfe
6 - Meteoroid

Here, is an example. The goal is to have all the countries seal number in the SEAL column. 

Labels