Announcements
cancel
Showing results for
Did you mean:
Creator II

## show cumulative sum

in put

 Month Year Sales Jul-19 23 Jun-19 44 May-19 444 Apr-19 11 Mar-19 85 Feb-19 48 Jan-19 949 Dec-18 48

Required Output:

 Month Year Sales Output Jul-19 23 1652 Jun-19 44 1629 May-19 444 1585 Apr-19 11 1141 Mar-19 85 1130 Feb-19 48 1045 Jan-19 949 997 Dec-18 48 48

1 Solution

Accepted Solutions
MVP

I am not sure why Sum(Sales) is doubled, but you can try this 🙂

``Aggr(RangeSum(Above(Sum(TOTAL <[Month Year]> Sales), 0, RowNo())), ID, ([Month Year], (NUMERIC)))``

If that was by error, then try this

``Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ID, ([Month Year], (NUMERIC)))``

8 Replies
MVP

Front end or back end?

Creator II
Author

In Front end Sunny, Thank you

MVP

Try this expression

``Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ([Month Year], (NUMERIC)))``

Creator II
Author

Table:
LOAD ID,Date(Date#([Month Year], 'MMM-YY'), 'MMM-YY') as [Month Year],
Sales;
ID, Month Year, Sales
1, Jul-19, 23
1, Jun-19, 44
1, May-19, 444
1, Apr-19, 11
1, Mar-19, 85
1, Feb-19, 48
1, Jan-19, 949
1, Dec-18, 48
2, Jul-19, 23
2, Jun-19, 44
2, May-19, 444
2, Apr-19, 11
2, Mar-19, 85
2, Feb-19, 48
2, Jan-19, 949
2, Dec-18, 48
];

MVP

What is the needed output?

Creator II
Author

same output but need ID &  [Month Year] aggrigation

 ID Month Year Sum(Sales) Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ([Month Year],(NUMERIC))) 1 Jul-19 46 3304 1 Jun-19 88 3258 1 May-19 888 3170 1 Apr-19 22 2282 1 Mar-19 170 2260 1 Feb-19 96 2090 1 Jan-19 1898 1994 1 Dec-18 96 96 2 Jul-19 46 3304 2 Jun-19 88 3258 2 May-19 888 3170 2 Apr-19 22 2282 2 Mar-19 170 2260 2 Feb-19 96 2090 2 Jan-19 1898 1994 2 Dec-18 96 96
MVP

I am not sure why Sum(Sales) is doubled, but you can try this 🙂

``Aggr(RangeSum(Above(Sum(TOTAL <[Month Year]> Sales), 0, RowNo())), ID, ([Month Year], (NUMERIC)))``

If that was by error, then try this

``Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ID, ([Month Year], (NUMERIC)))``

Creator II
Author

Working perfectly Thank you sooo much Sunny 😀