Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
no | sales | output |
---|---|---|
1 | 10 | 10 |
2 | 20 | 30 |
3 | 40 | 70 |
4 | 50 | 120 |
From the table i want the first sales value in output column, after i want to add the first value in output column and second value in sales column. similarly all the values add. which function can be use?
Here you go...
Table:
LOAD * INLINE [
no, sales
1, 10
2, 20
3, 40
4, 50
];
FinalTable:
LOAD *,
RangeSum(Peek('output'), sales) as output
Resident Table
Order By no;
DROP Table Table;
Something like this
RangeSum(Peek('output'), sales) as output
sunny,
In my table i am having only no and sales, and the output field will be create using expression only.
in that field come at like above result
Are you doing this on the front end? May be this...
RangeSum(Above(Sum(sales), 0, RowNo()))
Hi Nithyakala,
To do cumulative task, in expression you have option for accumulation.
In given case above, go to Chart Properties -> Expression Tab, select "Full Accumulation".
nope, am using script. am used this following expression,
load *, no|sales
1|10,
2|20,
3|40,
4|50;
Please find attached the file for example
Hi,
Refer the above link.it may help you with clear Explanation.
Calculating rolling n-period totals, averages or other aggregations
--Surendra
Here you go...
Table:
LOAD * INLINE [
no, sales
1, 10
2, 20
3, 40
4, 50
];
FinalTable:
LOAD *,
RangeSum(Peek('output'), sales) as output
Resident Table
Order By no;
DROP Table Table;
ya its coming. thank you