nested if with OR and isblank function in prepare recipe

DEEPTMA2
DEEPTMA2 Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 2 ✭✭✭

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

Answers

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 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()
Setup Info
    Tags
      Help me…