Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
afbraga1
Creator
Creator

Let and Peek

Hello,

Got a question concerning Peek and Let statements. I have the code below but it is returning me in the trace  this - date(AddYears(YearStart(today()-1),-2),'YYYYMMDD'), when I expected to see a date.

LET v1 = Peek('Date', 'table1');

Trace $(v1);

Currently I have to do it in an extra step, in order  to have the date result calculated.

LET v1 = Peek('Date', 'table1');

LET v2 = $(v1);

Trace $(v2);

Thank you.

Best regards,

André Braga

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Table:
LOAD * INLINE [
    Date
    "Date(AddYears(YearStart(Today()-1),-2),'YYYYMMDD')"
];

LET v1 = Evaluate(Peek('Date'));

Trace $(v1);

View solution in original post

2 Replies
sunny_talwar

Try this

Table:
LOAD * INLINE [
    Date
    "Date(AddYears(YearStart(Today()-1),-2),'YYYYMMDD')"
];

LET v1 = Evaluate(Peek('Date'));

Trace $(v1);
afbraga1
Creator
Creator
Author

Ah that was it! I totally forgot about evaluate() function. Thanks Sunny.