Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
gireesh1216
Creator II
Creator II

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 II
Creator II
Author

Thanks

its_anandrjs

Try also

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

Regards

Anand

gireesh1216
Creator II
Creator II
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

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 II
Creator II
Author

I am using in script level

gireesh1216
Creator II
Creator II
Author

Your expression also working

BELOW EXPRESSION ALSO WORKING

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