Re: What is Qlikview equivalent of SAS Retain statement?
Peek gets the data from qlikviews associative database, but previous gets the data directly from the input source. That's why peek works here when previous doesn't. Trying to use ATP won't work because the other expressions also use the input source and not the associative database. What you could do is first store your table that includes ATP to a qvd file and then load that qvd and add your calculations that need ATP.