Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, i have the following code:
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),2))"},JobPosition={'Chofer'}>}CantidadTerminaciones)-
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),1))"},JobPosition={'Chofer'}>}CantidadTerminaciones))/
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño)))"},JobPosition={'Chofer'}>}total DiferenciaFecha)+
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),2))"},JobPosition={'Chofer'}>}total DiferenciaFecha))/2))+
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),3))"},JobPosition={'Chofer'}>}CantidadTerminaciones)-
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),2))"},JobPosition={'Chofer'}>}CantidadTerminaciones))/
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),2))"},JobPosition={'Chofer'}>}total DiferenciaFecha)+
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),3))"},JobPosition={'Chofer'}>}total DiferenciaFecha))/2))+
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),4))"},JobPosition={'Chofer'}>}CantidadTerminaciones)-
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),3))"},JobPosition={'Chofer'}>}CantidadTerminaciones))/
((sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),3))"},JobPosition={'Chofer'}>}total DiferenciaFecha)+
sum({<FechaNumericaUSA={"<=$(vFecha)"},FechaUSA={"<$(=Makedate($(vAño),4))"},JobPosition={'Chofer'}>}total DiferenciaFecha))/2))+...
Each one of this blokes of code represents a month (i have one for every month)
This code gets the turnover% per month and sums it, the problem is that i get null when there were no events (hire/fire-left)
So at the end, i get something like Jan 2/ Feb 4/ Mar-/ Apr/1/...
2+4+null+1=error
Do you have any idea about how to handle those null values?
Instead of doing a+b+c... do RangeSum(a, b, c)... so in your example...2+4+null+1=error, but RangeSum(2, 4, null, 1) = 7
Instead of doing a+b+c... do RangeSum(a, b, c)... so in your example...2+4+null+1=error, but RangeSum(2, 4, null, 1) = 7