5 Replies Latest reply on Jun 19, 2018 7:48 AM by Zhouyi Zhang

# Count Anticipated Tasks After First 4 Dates in Day

Hi All,

I would like to count how many tasks per day and per worker were anticipated by more than 20 minutes. ("# Anticipated Tasks (More than 20 Mins earlier)" calculated field) However, I would like to start counting the Anticipated Tasks coming from that formula only after the first 4 tasks (to be more specific, the first 4 tasks I obtained after applying some Context Filters to the worksheets). So I don't want to include in my count the Anticipated Tasks that were among the first 4 tasks for the day appearing in the worksheet.

In worksheet 1 I have managed to obtain the # of Anticipated Tasks and also to count the tasks after the 4th task, but when I go to Worksheet 2 and I try to aggregate these numbers by day I can't manage to obtain the right results. You can see there is a mistake already in trying to count the number of tasks after the 4th task (if you look at the last column of worksheet 2 it should be 3 the result for the 27th of May).

I am sure there is a small thing I am not able to spot about how I am using the calculations or the viz itself, but I can't figure it out..

Looking forward to hearing some suggestions / hints on this and thanks a lot in advance for your help.

Cheers,

Francesco

• ###### 1. Re: Count Anticipated Tasks After First 4 Dates in Day

Hi, Francesco

Is it something like this? if yes, please find attached updated workbook. below is what I did to get the result

Hope this helps

ZZ

1 of 1 people found this helpful
• ###### 2. Re: Count Anticipated Tasks After First 4 Dates in Day

Hi Zhouyi,

Definitely very helpful. I don't know why I didn't go that way with the Sum..

However, I would also like to count only the Anticipated Tasks out of the tasks after the 4th one.

In worksheet 1 (last column, "# Anticipated Tasks after 4th Task / Day" calculated field)  I have now added the calculation to have the tasks that are both after the 4th task and anticipated counted as '1' in the viz. When I go back to the worksheet 2 aggregated by day this doesn't work and I cannot change the measure as it is an Aggregate..

Do you have a way to quickly fix this too by any chance?

Please find attached what I am referring to.

Thank you once again!

Francesco

• ###### 3. Re: Count Anticipated Tasks After First 4 Dates in Day

Hi, Francesco

I hope I understand your requirement, to make your last calculation as non-aggregated, I will suggest to use LOD as shown below, and then you can do sum afterword.

Workbook updated as attached.

Hope this helps

ZZ

• ###### 4. Re: Count Anticipated Tasks After First 4 Dates in Day

Hi Zhouyi,

Thanks a lot for that. I had tried that way, but I had probably written the formula incorrectly as it was not working...

Now it does perfectly and it's all clear.

Thank you!

Francesco