Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to ackumulate cashflows in time order to see the balance peaks and lows for each date.
Should be a rather simple exercise but for some reason I cannot get i right.
Any ideas?
Samle file attached.
Kind Regards,
Olle
Change in the script to get cumulative sum
Load Date,Timestamp,Amount,If(Date <> Previous(Date),Amount,Amount+Peek(CumSum)) As CumSum Resident Initial Order by Timestamp;
Is this your expected output?
Hi Anbu,
thanks for your answer.
However, to receive the balance we need to ackumulate the cash flows coming in/going out.
In other words CF1+CF2+CF3+CF4+CF5 and so on and so on. Then find the daily max/min.
Please find attached source data. I've done some calcs in there. Expected output as per below:
Max 1-Apr | 504,573.27 |
Min 1-Apr | -349,900.00 |
Max 2-Apr | 20,006,667.80 |
Min 2-Apr | -2,600,000.00 |
Thanks in advance,
Olle
And here comed the attachment!
//O
Is this what you are looking at?
Regards
ASHFAQ
I'm afraid not Ashfac, please see the excel file to see what I'm looking for
Not lookin for the largest/smallest transactions. Rather the min/max running balance.
Kind Regards,
Olle
Check this
Hi anbu!
Thanks for your answer. Your suggested solution works assuming the input data is sorted in the correct order, which is not the case for me unfortunatley. Pls see attached. I reloaded data using your app, but I sorted the input data on value instead of date, which messed up the numbers pretty bad.
I need the app to return the correct figures, no matter the input sort order, any ideas?
Best Regards,
Olle
I still see my script ordered on date in the attached app. Can you post what you tried and expected output for loaded date
Sorry,
attached the wrong qv-file.
Here comes the correct one.
result should still be the same:
Max 1-Apr | 504,573.27 |
Min 1-Apr | -349,900.00 |
Max 2-Apr | 20,006,667.80 |
Min 2-Apr | -2,600,000.00 |
Thanks in advance,
Olle