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: 
jmarchand
Contributor
Contributor

Can I subtract 2 rows directly in data manager with add field

Can I subtract 2 rows directly in data manager with add field?

Like the following example.

clipboard_image_0.png

Thanks

4 Replies
trdandamudi
Master II
Master II

Give a try on the below code:

I Option:

Data:
Load *,
Value-Peek(Value) as Result;

Load * Inline [
FiscalMonth,Value
Apr,100
May,300
Jun,250
Jul,400
Aug,350
Sep,550
];

 

II Option:

Data:
Load *,
if(rowno()>1,Value-Peek(Value),Value) as Result;

Load * Inline [
FiscalMonth,Value
Apr,100
May,300
Jun,250
Jul,400
Aug,350
Sep,550
];

sunny_talwar

When you say data manager, do you mean script?

jmarchand
Contributor
Contributor
Author

clipboard_image_0.png

 

jmarchand
Contributor
Contributor
Author

Do you undestand why I mean with this screeshot?

Thank you.