Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

aniruddhyadutta
New Contributor

Evaluate NULL values in a filed

Hi All,

I want to evaluate if a filed is NULL or not in a table and based on which I  want to assign a status in another filed in the table(like a flag)

//if (EVENT_COMMENT='-' ,'ACTIVE','HANDLED') as FINAL_ALERT_STATUS

    //if(len(trim("EVENT_COMMENT"))='0','ACTIVE','HANDLED') as FINAL_ALERT_STATUS

    //if(ISNULL(EVENT_COMMENT),1,0) as FINAL_ALERT_STATUS

     if(len(trim(EVENT_COMMENT))=0,'ani') as FINAL_ALERT_STATUS

I tried all the above options but nothing seems to work.Can someone plz help on this?

1 Reply

Re: Evaluate NULL values in a filed

if(len(trim(EVENT_COMMENT))=0,'ani') as FINAL_ALERT_STATUS

This looks basically correct to me. You might want to do something like this though:

if(len(trim(EVENT_COMMENT))=0,'ACTIVE','HANDLED') as FINAL_ALERT_STATUS


talk is cheap, supply exceeds demand