ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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
Météoroïde

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 RÉPONSES 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
Météore

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
Météoroïde

I will upload a dummy data soon. 

ydklyfe
Météoroïde

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

Étiquettes
Auteurs des meilleures solutions