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: 
ben_skerrett
Contributor III
Contributor III

Set Analysis: Multiple Criteria (inc. if difference between two dates is less than Zero)

Hi,

I have read various post but to no avail and wondered if anyone could help please.

I have the below expression:

                     Count({<'Document Status'={'30'},'Document Version'={'0'},'Return Due Date'={'<>Null()'}>}distinct([%Key_DIR]))

i would like to add another criteria where

([MB51.ReportDate]-[Return Due Date])<0

Thanks

2 Replies
Anil_Babu_Samineni

Perhaps this?

Count({<'Document Status'={'30'},'Document Version'={'0'},'Return Due Date'={"=(Len([Return Due Date])<0 or <>Null()) and ([MB51.ReportDate]-[Return Due Date])<0"}>}distinct([%Key_DIR]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ben_skerrett
Contributor III
Contributor III
Author

Hi Anil,

Thank you for the reply but unfortunately it wrongly returned a value of zero.

The logic i am looking for is

If Document status =30

AND

Document Version=0

AND

Return Due date <>Null

AND

(MB51.Report - Return Due Date) <0

then count the unique values from ([%Key_DIR]

 

It works, with the exception of (MB51.Report - Return Due Date) <0 and i do not know how to add a subtraction.

 

Thanks