Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
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]))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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