Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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

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

Something like this should work:

LOAD

     Date,

     Amount,

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

FROM

     ...source...

     ;


talk is cheap, supply exceeds demand