Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Imrat
Contributor
Contributor

Date Comparision

How do i compare two dates with additional condition in set analysis, i  tried the following but  seems to be i am missing something.

Basically what i am trying to do is taking count of status,  if completion date is  greater than due date.

=count( {<[Completion Date] = {">$([Due Date])"},Status={'Closed'} > } Status)

 

Many thanks in advance

4 Replies
saminea_ANZ
Creator
Creator

May be this?

=count( {<[Completion Date] = {"=[Completion Date]>[Due Date]"},Status={'Closed'} > } Status)

Imrat
Contributor
Contributor
Author

i tried this , count is zero 

saminea_ANZ
Creator
Creator

 Can you please create one more field in script as

Load *, If([Completion Date]>[Due Date], 1,0) as Flag;

and the expression like

=count( {<Flag = {'1'},Status={'Closed'} > } Status)

 
Imrat
Contributor
Contributor
Author

Many thanks,

it worked like a charm.