Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
consider the following scenario,
input table..... output table...........
Year Value Year value output
2007 10 2007 10 (10+20+15+40)=85
2008 20 2008 20 (10+20+15)=45
2009 15 2009 15 (10+20)=30
2010 40 2010 40 10
I would like to show the chart like output table as shown above.....
could anyone help me to solve this problem............
thanks in advance.......
You can make a pivot table and use before() or above() depending on layout.
For example output expression:
rangesum(above(sum(value),0,RowNo()))
returns row accumulation from top to bottom.
Hi
Its not cumulation...
could anyone help me to solve this problem.....
Hi,
we tried to achieve the required output in script level and i think we achieved it...
See the script below and confirm
nv:
load * inline [
Yearss,vals
2007,10
2008,20
2009,30
2010,40 ]
;
nv1:
LOAD MAX(Yearss) as MaxVal,
MIn(Yearss) as MinVal RESIDENT nv;
LET a=PEEK('MinVal',0,'nv1');
LET b=PEEK('MaxVal',0,'nv1');
let x = 0 ;
for i = $(a) to $(b)
load
$(i) as yrr,
sum(vals) as op
resident nv
where Yearss <=('$(b)')-('$(x)') ;
let x = x+1 ;
next
Regards,
Ajay