Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
somersst
Contributor III
Contributor III

How to retrieve previous values

 

I've the following table

0683p000009LzUE.png

I want to obtain the following :

0683p000009LzZD.png

So I need something in Talend which I can use to calculate the previous weeks. Above is some simplified, because I need to retrieve the last 10 weeks.

Labels (2)
1 Solution

Accepted Solutions
somersst
Contributor III
Contributor III
Author

I've found myself a good solution, making use of the tMemorize component.

I included here some screenshots, that should give you a good idea on the solution0683p000009Lzav.png0683p000009Lzer.png0683p000009Lzew.png

View solution in original post

5 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Hi,

 

You can try with tMap variables to get your desired output.

 

Regards,

somersst
Contributor III
Contributor III
Author

Hi,

can you provide some more information, because it’s not clear to me how to use this tmap. I use it normaly to do ordinary lookups.

Anonymous
Not applicable

Hi,

 

     A similar issue has been solved by TRF. Could you please refer his post and make suitable changes for your use case?

 

https://community.talend.com/t5/Design-and-Development/How-to-Perform-Cumulative-in-Talend/td-p/3648...

 

Warm Regards,

 

Nikhil Thampi

TRF
Champion II
Champion II

You can adapt my post as suggested by @nthampi or go with local tMap variables as proposed by @vboppudi.
The second solution is a little more tricky, what you have to know is that these variables keep their value between rows, so you can "see" values from the previous record.
somersst
Contributor III
Contributor III
Author

I've found myself a good solution, making use of the tMemorize component.

I included here some screenshots, that should give you a good idea on the solution0683p000009Lzav.png0683p000009Lzer.png0683p000009Lzew.png