Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I am trying to calculate the total time for agent was started their shifts late. The column contains negative(-) values as well, could you please assist. my expression i used is
sum ( aggr(
fabs( SUM(StartShiftLate)/86400)
, AgentName) )
STARTinSec |
-28 |
-349 |
-66 |
-13 |
-35 |
-43 |
-6 |
-41 |
-1071 |
-1345 |
-60 |
-41 |
-25 |
-17 |
-22 |
-42 |
-20 |
0 |
-267 |
-153 |
-215 |
-1621 |
-355 |
-508 |
-30 |
-30 |
-33 |
-33 |
-33 |
-53 |
20 |
-32 |
-143 |
27000 |
-189 |
-246 |
-47 |
-265 |
-1674 |
-23 |
-415 |
-20 |
-38 |
-15 |
-15 |
-1409 |
-76 |
-11 |
-1 |
-373 |
-4 |
-18 |
12 |
-11 |
-8 |
-157 |
-12 |
2589 |
10 |
7 |
-87 |
-7006 |
Hi Marvin,
Could you explain more what desired output you require.
thanks,
Arvind Patil
hi,
i need to get the sum of time start shift late, if the time have a minus then the person was early and positive is late. so the result would be sum of positive values.
This?
sum ( aggr(
SUM({<StartShiftLate={">0"}>}StartShiftLate) /86400
, AgentName) )
Hi Marvin,
Try:
Sum(if(STARTinSec>0,STARTinSec))
Cheers
Andrew
Hi marvin,
Try to use below:
=aggr(sum({<Agentname={'SUm(STARTinSec)>0'}>}STARTinSec)/86400,Agentname)
Thanks,
Arvind Patil
Try like this
For Positive :
sum ( aggr(SUM({<STARTinSec={">0"}>}STARTinSec) /86400, AgentName) )
For Negative :
sum ( aggr(SUM({<STARTinSec={"<0"}>}STARTinSec) /86400, AgentName) )
hi,
Thanks but its still not working yet , its not giving any results
I think you have only one record which has 0. And you are using Fabs() - Returns always +ve number only. I am not sure, On which case you used Fabs()