Hi everyone,
I have a requirement in my project to calculate cumulative total through graphical HANA views.
please help me on this.
for ex - we have a table recording sales amount and loss amount for each year and we have to calculate total sales for each year.
formula for total sales :-
total sales = previous year total sales + Sales amt - loss amt.
Input records will look like below for example :-
Year Sales Amt loss Amt
2001 100 50
2002 200 100
2003 150 100
2004 400 250
2006 300 150
2007 200 100
For 1st year, Previous year total sales = 0
so Total sales for 1st year = 0 + Sales amount - loss amount
Output records will look like -
Year Sales Amt loss Amt Total sales
2001 100 50 50
2002 200 100 150
2003 150 100 200
2004 400 250 350
2006 300 150 500
2007 200 100 600
Please let me know how we can achieve it through graphical calculation view?
Regards,
Neeraj