Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

t_hylander
Contributor

"split" accumulation in load-script

Im dried out of ideas how to search for this.

I have a dataset with a date and a accumulative data-column, like this;

20160116, 100

20160117, 102

20160118, 105

20160119, 108

but I want it to also have a third column;

20160116, 100, 0

20160117, 102, 2

20160118, 105, 3

20160119, 108, 3

Can anyone help me?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: "split" accumulation in load-script

Something like this should work:

LOAD

     Date,

     Amount,

     Rangesum(0,Amount-Previous(Amount)) as Difference

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand
1 Reply
MVP & Luminary
MVP & Luminary

Re: "split" accumulation in load-script

Something like this should work:

LOAD

     Date,

     Amount,

     Rangesum(0,Amount-Previous(Amount)) as Difference

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand