Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
=Count({<Activity_Date={">=$(=max(Assignment_Start_Date))"}>}FieldName)
is working fine now. There was a difference in my date formats so now they are the same and is working like a charm...
Have a twist to this .. The below code works if one employee is selected and gives zero when grid is allowed to display all employees.
What is missing now?
=Count({<Activity_Date={">=$(=max(Assignment_Start_Date))"}>}FieldName)
Faiq,
I believe this is because the set analysis is being applied to the entire data set when you actually need it to apply for each employee in the grid. To do this you will need use the AGGR function. Below I've guest at the correct expression. If what I posted doesn't work please post a sample QVW so we can work it out for you.
=sum(Aggr(Count({<Activity_Date={">=$(=max(Assignment_Start_Date))"}>}FieldName),Employee))
-Josh
Qlik
Thanks for looking into Josh. I tried a simple If statement and is working now. Will let you know if more errors appear in testing
=Count(if(Activity_Date>=Assignment_Start_Date, Activity_GUID))