Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i need help
this should be my result
| A Year | B Month | C sum(month) | D add the same row with previous row |
| 2014 | Aug | 8.609 | 8.609 |
| 2014 | Sep | 2.623 | 11.231 |
| 2014 | Okt | 81.368 | 83.990 |
| this my script |
LOAD ACCOUNTINGCURRENCYAMOUNT,
GENERALJOURNALENTRY,
LEDGERACCOUNT,
mid(LEDGERACCOUNT,1,6) as ACCOUNT
FROM
(qvd);
LOAD CREATEDDATETIME,
Year(CREATEDDATETIME) AS Year,
Month(CREATEDDATETIME) AS Month,
RECID AS GENERALJOURNALENTRY
FROM
(qvd);
i want to work wit peek but its all new for me. Have i make a left join?
for the two tables
have i build a temp table?
You'll have to create one table that contains the year and month field and a field that contains the values you want to sum. Once you have that table you can do something like:
Result:
LOAD *, rangesum(SumOfAmount, peek(RunningSum)) as RunningSum;
LOAD Year, Month, sum(MyAmountField) as SumOfAmount
resident MyTable
group by Year, Month;
Please see the attached
thanks for your answer but my level is not so high
my solution is in the expression with rangesum and below/above (-1/0/1)
but i think it doesnt work over years because i have to get a reangesum over all years from the beginning