Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
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)))
Front end or back end?
In Front end Sunny, Thank you
Try this expression
Aggr(RangeSum(Above(Sum(Sales), 0, RowNo())), ([Month Year], (NUMERIC)))
Hi Sunny Thanks for your response if add ID its not working please help me on this
Table:
LOAD ID,Date(Date#([Month Year], 'MMM-YY'), 'MMM-YY') as [Month Year],
Sales;
LOAD * INLINE [
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
];
What is the needed output?
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 |
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)))
Working perfectly Thank you sooo much Sunny 😀