Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to implement the below in qlickview script
i.e is not null concept in qlik view script
case when not ATTR1 is null then ATTR1
when not ATTR2 is null then ATTR2
when not ATTR3 is null then ATTR3
else 'N/A' end "Hold_Reasons"
if(not isnull(ATTR1 ),ATTR1 ,
if(not isnull(ATTR2 ),ATTR2,
if(not isnull(ATTR3 ),ATTR3,'N/A')))
or
if(isnull(ATTR1 )<>-1,ATTR1 ,
if(isnull(ATTR2 )<>-1,ATTR2,
if(isnull(ATTR3 )<>-1,ATTR3,'N/A')))
if(not isnull(ATTR1 ),ATTR1 ,
if(not isnull(ATTR2 ),ATTR2,
if(not isnull(ATTR3 ),ATTR3,'N/A')))
or
if(isnull(ATTR1 )<>-1,ATTR1 ,
if(isnull(ATTR2 )<>-1,ATTR2,
if(isnull(ATTR3 )<>-1,ATTR3,'N/A')))
It's working thank you
I use this syntax :
IF(LEN(TRIM(ATTR1))=0,ATTR1,
IF(LEN(TRIM(ATTR2))=0,ATTR2,
IF(LEN(TRIM(ATTR3))=0,ATTR3,'N/A'))) AS Hold_Reasons
This will work for blank spaces and null values.
I hope this helps!
Regards
MultiView
You should replace '=' by '<>'. Otherwise, you obtain only NULL values..
You should even write:
if( Len(Trim(_)) , ATTR? , ... )