Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to get count of rows in load script
Date ID
24/04/2017 11
25/04/2017 10
26/04/2017 12
27/04/2017 37
want to know count of rows if select 26/04/2017 - count should be 3, if 27/04/2017 --- count should be 4
I want 1 step back accumulation in the script as a new field
Can you explain this with an example? I am not sure I understand this
In the above case, if I select 24th Date Sum of ID should be 11,
if I select 25th Date Sum of ID should be 10 + 11 -->21
if I select 26th Date Sum of ID should be 12 +10 - > 22
Try this
A:
LOAD * INLINE [
Date, ID
24/04/2017, 11
25/04/2017, 10
26/04/2017, 12
27/04/2017, 37
];
B:
Load Date,
ID,
RowNo() as Count1,
RangeSum(Peek('CumID'), ID) as CumID
Resident A
Order By Date asc;
Drop table A;