Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
venkatbza
Creator
Creator

I need output based on my below requirement

Hi,

i have YEAR  and SALES columns  i need output like below table.

any one help how can i do

              

yearsalesoutput
2011100100
2012200300
2013300600

Regards,

Venkat

1 Solution

Accepted Solutions
Gysbert_Wassenaar

load year, sales, rangesum(sales, peek('output')) as output from ...somewhere...;


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

load year, sales, rangesum(sales, peek('output')) as output from ...somewhere...;


talk is cheap, supply exceeds demand
venkatbza
Creator
Creator
Author

Thank you somuch Gysbert Wassenaar

its_anandrjs

Hi Venkat,

Another way of the same is

A:
LOAD year,sales,output,

if(RowNo()=1,sales,sales+Peek('Accumulate'))  as Accumulate;
LOAD * Inline   [
year, sales, output
2011, 100, 100
2012, 200, 300
2013, 300, 600  ]
;

Regards

Anand

venkatbza
Creator
Creator
Author

Thank you somuch