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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
felipeyague
Contributor II
Contributor II

Showing in two columns values from a cell of previous two rows

Hello, I would like to have a table where i can show in a row the values of the production costs of previous orders. I mean, my dimension is my produced material, and the cost of the current production order i can show in the row where the data of that production order are shown. But in the same row i would like to show the values of the two previous orders of that material in order to know the difference with the current order. In a graph it would be easier i think but i would like to have in a table. To sum up, it would be how to show values from previous records in a table in the current records. It would be great to do it in the data load editor. Thanks. 

4 Replies
brunobertels
Master
Master

Hi 

try the above function 

assuming your mesure is sum(cost) so the expression should be 

above(sum(cost),0,2)

MayilVahanan

Hi @felipeyague 

In Data load editor, try with Peek(fieldName,-2) to get the previous 2 order. 

Ref for Peek:

https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecor...

 

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

and will i be able to filter by measure? I mean, I need to get the cost of the previous orders where the material produced is the same than the one in the current order. Thanks.
felipeyague
Contributor II
Contributor II
Author

Thanks. I will try. But, how to select in the previous orders just the ones which produced the same material that the one in the current order? Thanks.