Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
aviadbein
New Contributor II

Date variable in load script

Hi all,

I defined a vLastUpdatedDate variable using LET statement in the load script as following:

RecentDate:

Load Date(MAX("Date")) as MaxDate

Resident DB;

Let vLastUpdatedDate= Date(Peek('MaxDate', 0, DB));

drop table RecentDate;

As you can notice the variable is getting the correct value (26/08/2018) in the variables section inside the app:

QlikQ.JPG

When I calling the variable in an object it gets the following value:

QlikQ2.JPG

Why so?

Tags (2)
1 Solution

Accepted Solutions
Partner
Partner

Re: Date variable in load script

in KPI Object try to use

=vLastUpdatedDate

3 Replies
Partner
Partner

Re: Date variable in load script

in KPI Object try to use

=vLastUpdatedDate

DavidŠtorek
Contributor III

Re: Date variable in load script

Hi,

what is your date format setting in main section  (SET DateFormat='DD.MM.YYYY';)? Try to use some agregation function as it is the only value it doesnt matter and KPI will maybe handel it better.

aviadbein
New Contributor II

Re: Date variable in load script

Tnx! It works (not only in KPI object...)!