
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Peek Function & Resident Loads - Need help
I am faily new to Qlikview and here is the code extract, I have already loaded data and placed it into a qvd. Now I am read from this qvd.
Peek_Audit_Master:
LOAD Run_Id,
Repository_Name,
Server_Name,
Informatica_Folder_Name,
Workflow_Name,
Mapping_Name,
Session_Name,
Session_Start_Time,
Session_End_Time,
Status,
Ts_Etl_Created,
Ts_Etl_Updated
FROM Peek_Audit_Master.qvd (qvd);
// The below two peek functions correctly give me the values of the min and max dates.
LET vMinSessionDate = Peek('Session_Start_Time',0,Peek_Audit_Master);
LET vMaxSessionDate = Peek('Session_Start_Time',-1,Peek_Audit_Master);
Now I am adding a temp table to do something but I dont't drop this table.
TempTable:
LOAD
Session_Start_Time AS Format_Session_Start_Time
RESIDENT Peek_Audit_Master;
// Problem is with the below two statements, the peek function returns me NULL values when I use these values in a textbox //to display the values.
LET vMinSessionDt = Peek('Session_Start_Time',0,Peek_Audit_Master);
LET vMaxSessionDt = Peek('Session_Start_Time',-1,Peek_Audit_Master);
Any ideas why is it not working?
Thanks,
Shoubhik.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shoubhik,
You should place the name of the table between ' '.
LET vMinSessionDt = Peek('Expression1',0,'Peek_Audit_Master');
LET vMaxSessionDt = Peek('Expression1',-1,'Peek_Audit_Master');
regards,
Werner


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shoubhik,
You should place the name of the table between ' '.
LET vMinSessionDt = Peek('Expression1',0,'Peek_Audit_Master');
LET vMaxSessionDt = Peek('Expression1',-1,'Peek_Audit_Master');
regards,
Werner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your help Werner! This totally works now. So the reason why the variables - vMinSessionDate and vMaxSessionDate where still getting evaluated correctly though the table name was not in '' was due to qlikview taking the table loaded in preceding statement by default.
Attaching the QVW for reference for other folks who may find it useful.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correct.
The TempTable doesn't contain the field Session_Start_Time, so the variable couldn't get evaluated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you getting correct Min and Max date? Check attached qvw

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works as well. Thanks so much Anbu. The thing is '' being used for the table name for Qlikview to evaluate the reference correctly.
