Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Need Logic from Script:
MOB Desired Output by using MOB
10 10
20 10+20=30
30 10+20+30=60
40 10+20+30+40=100
50 10+20+30+40+50=150
Regards
Aviral
You'll want to use:
rangesum(MOB, peek('NewField')) as NewField
in your script, but need to make sure your sorting is correct.
Find attached for example.
Hope this helps!
Hi Nag,
Please use the following script.
Credits to Jagan Mohan.(How can I calculate a cumulative sum in load script?)
TableName:
LOAD
F1,
F2,
RangeSum(F2, Peek('CumSum')) AS CumSum;
LOAD * INLINE [
F1, F2
a, 100
b, 200
c, 300
d, 400
];
Cheers,
Naresh
Use Range sum in the front end and also you can do this in the load script like
LOAD
Joining,
Leaving,
MOB,
Month,
Year,
RowNo() as ID,
RangeSum(MOB, Peek('CumalativeSum')) AS CumalativeSum
FROM
Book2.xlsx
(ooxml, embedded labels, table is Sheet1);
Thank You Guys,
So many Answers in little time and that too of so much varieties. Loved Qlikview Community &its Awesome Developers. All answers are Perfect in their own ways.
Once Again, Thanks for the Answers and your time.
Regards
Aviral
Hey Massimo, Your answer was awesome. Loved it.