Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
t_hylander
Creator
Creator

"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
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this should work:

LOAD

     Date,

     Amount,

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

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this should work:

LOAD

     Date,

     Amount,

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

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand