Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

IF and Null statement

I have a statement that I am looking to display the 0 and nulls if they are present but I can't get the IF statement to show the nulls. 

It's quite a beefy IF statement but if the field ActualDaysDifference is 0 or blank, I want it to keep that. It works for 0 but not for the blanks so I'm not sure what to do?

if(ActualDaysDifference = ' ' or '0', ActualDaysDifference,if(ActualDeliveryDate<PlannedDeliveryDate, networkdays(ActualDeliveryDate,PlannedDeliveryDate)*-1, WorkingDaysDifference)) AS DaysDifferenceAgain

Labels (2)
4 Replies
Highlighted
Master II
Master II

Try:

if(isnull(ActualDaysDifference)

or

if(len(ActualDaysDifference)=0

Highlighted
Creator
Creator

These don't bring in all the fields with 0 AND that are null though, surely it's just one or the other?

Highlighted
Master II
Master II

if(isnull(ActualDaysDifference) or ActualDaysDifference=0 , ...

or

if(len(ActualDaysDifference)=0  or ActualDaysDifference=0 , ...

Highlighted
Digital Support
Digital Support

Did Mike's final post help you resolve things?  If so, please be sure to give him credit by clicking the Accept as Solution button on his post.

Here are some additional links that may help a little as well:

https://community.qlik.com/t5/Qlik-Design-Blog/Finding-NULL/ba-p/1474279

https://community.qlik.com/t5/Qlik-Design-Blog/NULL-The-Invisible-Nothing/ba-p/1467674

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.