Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gireesh1216
Creator III
Creator III

Simple If Statement?

Hi All,

I am trying to use simple if statement if(B=' ','No Data','Data Available').But IF statement not working in qlikview.

EXAMPLE.PNG

15 Replies
Anonymous
Not applicable

Should work as is in script.

if(isNull(B),'No Data','Data Available') As DataFlag

Chanty4u
MVP
MVP

try this may be

aa:

LOAD *,

if(B>0,'No Data','Data Available') as Status;

LOAD * Inline [

A,B

aa,bb

cc,dd

dd,

rr,

ef,gg

mm,

rm,rw

];

gireesh1216
Creator III
Creator III
Author

Hi

your expression is working good.But i want not equal to null

i tried below script but not working

if(isnull(B) <> ' ','No Data','Data Available') as Status

gireesh1216
Creator III
Creator III
Author

thanks

its_anandrjs
Champion III
Champion III

Isnull function is returning -1  if there is NULL and 0 if there is any value.

Regards,

Anand

Chanty4u
MVP
MVP

hi,

am not sure check below

aa:

LOAD *,

If(Len(B)=0,'Null','data')     AS status;

LOAD * Inline [

A,B

aa,bb

cc,dd

dd,

rr,

ef,gg

mm,

rm,rw

];

if.PNG