Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accumulation

Hi,

I am attaching my excel,

here ws1 is the field which i need to devide based on quantity.

i am getting like this         

Part NoPosting DateQuantityTotal Qtyws1Cumulativeoutfield
0009799404/1/2016423415844
0009799403/31/2016100234158104100
0009799403/16/20161623415812016
0009799403/2/2016100234158220 38
0009799402/18/20164234158224 38
0009799402/16/201617234158241 38
0009799405/23/2015-4234158237 38
0009799405/22/2015-20234158217 38
0009799405/21/2015-2234158215 38
0009799405/20/2015-7234158208 38
0009799405/19/2015-4234158204 38
0009799405/18/2015-6234158198 38
0009799405/16/2015-16234158182 38
0009799405/15/2015-4234158178 38
0009799405/14/2015-8234158170 38
0009799405/12/2015-12234158158-12
00097994011/20/20142234158160 38
00097994010/23/201470234158230 38
00097994010/21/201413234158243 38
0009799405/21/2014-8234158235 38
00097994011/12/2013-1234158234 0

i want output like below.

my alocated it has to show 158 because ws1 is 158.

outfield should get from quantity.

        

Part NoPosting DateQuantityTotal Qtyws1Cumulativeoutfield
0009799404/1/2016423415844
0009799403/31/2016100234158104100
0009799403/16/20161623415812016
0009799403/2/2016100234158220 38
0009799402/18/20164234158224 0
0009799402/16/201617234158241 0
0009799405/23/2015-4234158237 0
0009799405/22/2015-20234158217 0
0009799405/21/2015-2234158215 0
0009799405/20/2015-7234158208 0
0009799405/19/2015-4234158204 0
0009799405/18/2015-6234158198 0
0009799405/16/2015-16234158182 0
0009799405/15/2015-4234158178 0
0009799405/14/2015-8234158170 0
0009799405/12/2015-122341581580
00097994011/20/20142234158160 0
00097994010/23/201470234158230 0
00097994010/21/201413234158243 0
0009799405/21/2014-8234158235 0
00097994011/12/2013-1234158234 0
20 Replies
Not applicable
Author

Hi Any idea.

ramasaisaksoft

Hi Janith,

For Straight table properties->Expressions->call "Quantity" as a expression  and there you can find  options Left hand side of your Expression name

3 options

No Accumulation

Full Accumulation

Partial or some values Accumulation

then u need to select Full accumulation.

perumal_41
Partner
Partner

use full accumulation like below

Not applicable
Author

Hi perumal,

thanks for replay,

this need to done in script

Not applicable
Author

HI Rama,

Thanks for replay,

This need to be done in script

Kushal_Chawda

What would be the output if you have multiple ws1?

Not applicable
Author

ws1 is  same for particular id

example:

000979940-158

000979941-170

000979942-190

jagan
MVP
MVP

Hi,

Try like this using Previous() like below

Data:

LOAD

*,

RangeSum(Previous(AccumSum), Quantity) AS AccumSum

FROM DataSource;

OR

Data:

LOAD

*,

RangeSum(Peek(AccumSum), Quantity) AS AccumSum

FROM DataSource;

Regards,

Jagan.

Kushal_Chawda

then try this

Data:

LOAD

[Part No]

[Posting Date]

Quantity

Total Qty

ws1

FROM Table;

Accumulate:

noconcatenate

LOAD *,

if(rowno()=1 or ws1<>previous(ws1),Quantity, rangesum(peek('Cumulative'),Quantity)) as Cumulative

Resident Data

order by ws1,[Posting Date] desc;

drop table Data;