Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Greater Than Date

Hi,

I am trying to compare the dates and get a sum like

Sum my field where Activity_Date is greater than Assignment_Start_Date and it is giving me the same value as Sum(FieldName).

Please help with the syntax as I am missing something...

=Count({<Activity_Date={">=$(Assignment_Start_Date)"}>}FieldName)

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

=Count({<Activity_Date={">=$(=max(Assignment_Start_Date))"}>}FieldName)

View solution in original post

13 Replies
sunny_talwar

Try this:

=Count({<Activity_Date = {"=Activity_Date >= Assignment_Start_Date"}>} FieldName)

Anonymous
Not applicable
Author

=Count({<Activity_Date={">=$(=max(Assignment_Start_Date))"}>}FieldName)

Not applicable
Author

Thanks Michael

it is almost working but it is doing Activity_Date>Assignment_Start_Date and I need Activity_Date>=Assignment_Start_Date

sunny_talwar

Did you try this?

=Count({<Activity_Date = {"=Activity_Date >= Assignment_Start_Date"}>} FieldName)

Not applicable
Author

Yes SunIndia and it gives 0

sunny_talwar

Assignment_Start_Date is a field from the script, right?

Would you be able to share a sample?

Not applicable
Author

Yes both are date fields from the script.... it is a simple comparison and then doing a sum...

sunny_talwar

Try this:

=Count({<Activity_Date = {"=Num(Activity_Date) >= Num(Assignment_Start_Date)"}>} FieldName)



and before you try the above expression, just make sure you get numbers in a text box when you do Num(Activity_Date) and Num(Assignment_Start_Date)

Best,

Sunny

Josh_Good
Employee
Employee

Hi FAIQ,

The most likely reason you are having trouble here is that the data in your set analysis expression are in a different format, possibly due to the dollar sign expansion.  Try forcing the Assignment_Start_Date value to be in the same date format as the Activity_Date value. 

So if the Activity_Date in this format:  YYYY/MM/YY then try this expression

=Count({<Activity_Date={">=$(Date(Assignment_Start_Date,'YYYY/MM/YY'))"}>}FieldName)

-Josh

Qlik