Okay, that's usefull, as it shows that we misunderstood each other.
As I understand it now, running-total depends on the output of the query (and then, indeed, it will depend on the order of the output):
What I was looking for, would only depend on the data in the Databank itself, not so much on the output.
So, the output of my query would be all planned payments in the next 2 months, the "cumulative sum" would be the sum of all payments uptill this payment (so also including the payments before now, that are not included in the output).
Example:
date amount Cumulative sum
15.4. 1.000 € 1.000 €
15.5. 1.000 € 2.000 €
15.6. 1.000 € 3.000 €
15.7. 1.000 € 4.000 €
15.8. 1.000 € 5.000 €
15.9. 1.000 € 6.000 €
Output of the query "Payments in the next two months":
date amount Cumulative sum
15.7. 1.000 € 4.000 €
15.8. 1.000 € 5.000 €
Of course, in this case with the running total I can have a work-around (taking the running-total of the query and adding the sum of the payments before today), but for some other cases I would be interested in solving the above question.
Regards
------------------------------
Ludwig Leijten
------------------------------
Original Message:
Sent: Thu June 24, 2021 11:04 AM
From: Robert Dostal
Subject: cumulative sum
I would say that depends on the sorting options of your report list. See sample attached.
This list is sorted by the month name instead of the numbers and therefore the running-total gets computed by that order.

You can also try the "at" option for the running-total function if you know what you're doing ;).
------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen
------------------------------
Original Message:
Sent: Thu June 24, 2021 10:49 AM
From: Ludwig Leijten
Subject: cumulative sum
Hi, I implemented it and it works.
One question left though:
how does Cognos "know" what the correct order is?
I want the order to be the dates, which does not have to be the order of the Payment_Id's. It might be, that during the project I include a new planned payment. Then the ID will be larger than the already existing planned payments, but the date might be earlier.
Can one influence this order-definition?
Thanks in advance
------------------------------
Ludwig Leijten
Original Message:
Sent: Thu June 24, 2021 09:13 AM
From: Robert Dostal
Subject: cumulative sum
Hi Ludwig,
I'd suggest to use the running-total function in a report. It lets you specify on what element/column you want a running total. See sample attached. There's the actual revenue, the cumulative revenue by region and the cumulative revenue for the whole report:

I used the followeing calculations:

and

The rest of the report should be regular filtering depening on what you'd like to present.
I hope this helps you.
------------------------------
Robert Dostal
Team Leader BI
GEMÜ
Ingelfingen