Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a table like this :
And I'd like to get a result like this :
And I'd like to get an accumulate of the amounts in another table like this :
How can I get that?
Regards, Marcel.
Date | Amount | Acc Amount |
04/05/2017 | 5 | 5 |
04/05/2017 | 1000 | 1005 |
04/05/2017 | 0 | 1005 |
04/05/2017 | 0 | 1005 |
Why do you want the same constant date in the first column in your resulting table?
And what determines the four rows then ?
If that's a typo, order your table by Date and use Rangesum(Peek() ) combination for accumulation:
RESULT:
LOAD
Date,
Amount,
Rangesum(Amount, Peek(AccAmount)) as AccAmount
RESIDENT INPUT
ORDER BY Date;
DROP TABLE INPUT;
Why do you want the same constant date in the first column in your resulting table?
And what determines the four rows then ?
If that's a typo, order your table by Date and use Rangesum(Peek() ) combination for accumulation:
RESULT:
LOAD
Date,
Amount,
Rangesum(Amount, Peek(AccAmount)) as AccAmount
RESIDENT INPUT
ORDER BY Date;
DROP TABLE INPUT;
Thanks Stefan! That was it.
Regards, Marcel.