Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

nested if with OR and isblank function in prepare recipe

DEEPTMA2
Level 1
nested if with OR and isblank function in prepare recipe

if ([mdm_party_id] = "UNSP" or isnull([mdm_party_id]))

then [Right_mdm_party_id] else [mdm_party_id] endif
 
I want to write it in DSS
I had tried but I am getting this error could anybody please assist me to sort out 
Formula is invalid : Incorrect formula: 'if(RX_MDM_PARTY_ID == "UNSP", isBlank("RX_MDM_PARTY_ID") , "MDM_PARTY_ID" if(RX_MDM_PARTY_ID))) ' 
 
Thanks
0 Kudos
1 Reply
fchataigner2
Dataiker
Dataiker

Hi,

the or operator is || . So maybe you're looking for 

if (MDM_PARTY_ID == "UNSP" || isnull(MDM_PARTY_ID), RX_MDM_PARTY_ID, MDM_PARTY_ID)

You can also do it visually with a clear cell where value is UNSP then a formula with a coalesce()
0 Kudos