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: 
Not applicable

Excluding data outside of criteria in expression

Hello, I am using expression :- if(NetWorkDays(max(BA_Contact_Date),max(Posting_Date))>'0'
and NetWorkDays(max(BA_Contact_Date),max(Posting_Date))<='4',money([Sum Paid]*-1))

This expression works just fine if data falls within the criteria. However if the posting date is more than 5 days after BA_Contact_Date the whole expression returns null. is there a way to force it to only to look at the data within specified criteria?

paul.

7 Replies
Not applicable
Author

where You use this expression?

Not applicable
Author

In Qlikview

Not applicable
Author

In an expression in a straight table

Not applicable
Author

Any ideas please? I'm still stuck!

SunilChauhan
Champion II
Champion II

Try below code

while comparing number should not be written in singal quote

if(NetWorkDays(max(BA_Contact_Date),max(Posting_Date))>0
and NetWorkDays(max(BA_Contact_Date),max(Posting_Date))<=4,money([Sum Paid]*-1))

hope this helps

Sunil Chauhan
Not applicable
Author

No this had no impact, I am still getting Null as output as there are dates and amount outside of the expression criteria, it cant decide to chose (despite the fact the expression is explicit)therefore I am getting a null. No idea why this is the case!

SunilChauhan
Champion II
Champion II

charts properties -> presentation->supress zero values check it

if not please attach sample file if possible

hope this helps

Sunil Chauhan