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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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
MVP
MVP

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.