Solved

Calculating forward sum of values

  • 15 February 2024
  • 4 replies
  • 270 views

Userlevel 3
Badge +4

Hi

I want to sum the values from my current starting point to the last value available in a metric. As you can see first value is 0.22 and last is -30,993,214 and sum of all those in middle will be 30,669,213 something.

that metric called inp_when to sell asset differs for each sage entity asset. How can i go about doing this calc in simple way? I tried moving sum etc but doesnt work.

 

icon

Best answer by Issam Moalla 15 February 2024, 12:48

View original

4 replies

Userlevel 5
Badge +9

Hi @mmusab ,

To achieve this, you could apply the Cumulate function.

Userlevel 3
Badge +4

Hi @Issam Moalla 

Can you show an example ? I tried but can’t seem to get my head around ? As cumulate only sum previous values.  

Userlevel 5
Badge +9

Hi @mmusab ,

Yes , consider values your source metric that you are looking to cumulate.
In the screenshot below , I have added Sum forward metric which will add the values forward.

If you are looking to apply cumulate on the reverse order, you would need a Reverse order property in the list you wish to cumulate upon:
 

And apply the formula based on that order using the following formula:

cumulate (Values, Years on Years.'Reverse Order')


Hope this is what you are looking to achieve.
If not could you share an example how the result should be calculated.
Issam

Userlevel 3
Badge +4

Thanks a lot. 

Reply