Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Date | Employee |
1/1/2018 | 50 |
1/2/2018 | 10 |
1/2/2018 | -15 |
1/3/2018 | 40 |
1/3/2018 | -5 |
In that table contain employee join and resign in specific date. we need how many employee available in last in script level.
Result should be 80 number of employee
How about Sum(Employee)?
Is it possible write in script level sum()
i try this one
load
Date,
Employee+peek(Employee) as EmployeeNo
from Emplyoee;
tab1:
LOAD Sum(Employee) As SUM_Emp
;
LOAD * INLINE [
Date, Employee
1/1/2018, 50
1/2/2018, 10
1/2/2018, -15
1/3/2018, 40
1/3/2018, -5
];
One solution is.
tab1:
LOAD *, RangeSum(Peek(Sum_Emp),Employee) As Sum_Emp
;
LOAD RecNo() As RowID, * INLINE [
Date, Employee
1/1/2018, 50
1/2/2018, 10
1/2/2018, -15
1/3/2018, 40
1/3/2018, -5
];