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

Announcements
Join us in NYC Sept 4th 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

1 Solution

Accepted Solutions
Anonymous
Not applicable

try if(isNull(B),'No Data','Data Available')

View solution in original post

15 Replies
Anonymous
Not applicable

try if(isNull(B),'No Data','Data Available')

gireesh1216
Creator III
Creator III
Author

Thanks

its_anandrjs
Champion III
Champion III

Try also

if( Len(B) = 0,'No Data','Data Available')

Regards

Anand

gireesh1216
Creator III
Creator III
Author

Hi

I am trying to do not equal to 'null '.But condition not working

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

Chanty4u
MVP
MVP

try this

if('B'<>' ','null','data') as new

its_anandrjs
Champion III
Champion III

Try this also

if(isnull(B) = -1,'No Data','Data Available') as Status


Regards

Anand

Anonymous
Not applicable

Does this not solve your issue?

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

isNull(B) is a boolean and will return True or false. when evaluated.

Are you using it in script or in an expression?

gireesh1216
Creator III
Creator III
Author

I am using in script level

gireesh1216
Creator III
Creator III
Author

Your expression also working

BELOW EXPRESSION ALSO WORKING

If(B>0,'NO DATA','DATA')