Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
that_anonymous_guy
Contributor III
Contributor III

Is there a way to use data of previous column?

I have a column(Field1). I want a calculated field(Diff) which will give the difference between the previous two values in the previous row. 

Field1 Diff
5% 5%
12% 7%
14% 2%
19% 5%
24% 5%

 

Is there a way to do this in the table(front end) or else in the script?

Labels (5)
2 Replies
MayilVahanan

Hi

In Script, use previous or peek function, in front end, try with above()

Like

Load Field1, Field1 - Alt(Previous(Field1),0)  as Diff from yourtable;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
that_anonymous_guy
Contributor III
Contributor III
Author

Hi 

Thank you for your response but above is only picking value from the its own column but I want to peek value from other column...something like hlookup in excel