Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Using variables in Load...am having some questions

Hello,

I am using the below script

MaxKeyLoad:


load Date(max(RUN_DATE),'YYYY-MM-DD') as MaxID
from
V_ETL_HISTORY_EXECUTION.qvd (qvd);

Let MaxID=peek('MaxID',0,MaxKeyLoad);

Let MaxID2=Date($(MaxID),'YYYY-MM-DD');

when i use $(MaxID), it gives the correct date

but since i have used the date value of MaxID into MaxID2, the MaxID2 is not giving the correct date and it shows something like 1905-06-07

Now my question is, can we use the value of one variable into another variable in the script?

-br

Arif

1 Reply
MVP
MVP

Using variables in Load...am having some questions

I'm going to guess that you need this instead:

LET MaxID2 = date(MaxID,'YYYY-MM-DD');

If it doesn't work, I can take a closer look.

Community Browser