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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

If, greater than and less than

Hi 

This works 

If(isnull(date),networkdays(date2,today()))>16,1,0) as higher 

This doesn't 

 

If(isnull(date),networkdays(date2,today()))>16,)If(isnull(date),networkdays(date2,today()))<56,1,0) as higher_lower 

 

I've tried ' or'and 'and'

 

Thanks

 

1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

If(networkdays(date2,today())>16 and networkdays(date2,today())<56,1,0)

Try above.

Do you have null in the date field?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

6 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @D19PAL ,

 

Try below.

 

If(isnull(date),networkdays(date2,today())>16 and (isnull(date),networkdays(date2,today()))<56,1,0)

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
D19PAL
Creator II
Creator II
Author

The syntax is giving me an error.

abhijitnalekar
Specialist II
Specialist II

If(networkdays(date2,today())>16 and networkdays(date2,today())<56,1,0)

Try above.

Do you have null in the date field?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
D19PAL
Creator II
Creator II
Author

That works, no I don't have null in date, do I need to add it? And why and how.

 

Thanks

D19PAL
Creator II
Creator II
Author

I've got it working, I nested it underneath another if isnull statement.

abhijitnalekar
Specialist II
Specialist II

Great!!!!

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!