Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter by date variable in load statement

Hello,

I am trying to load in data based on the date variable created using calendar object (in DD/MM/YYYY format). The date in the database (MS Access) is also in the short format.

When I try to select the date from the calendar object & trigger reload , I am unable to load the extract the data based on the selected date.

However it works using today function as below

LOAD Account,Currency, Cal_date Where Match(Date(Cal_date),date(today()));

SQL SELECT Account,Currency, Cal_date FROM `Currentdata` ;

Can someone help me in the resolving it ?

LOAD Account,Currency, Cal_date Where Match(Date(Cal_date),vdate);

SQL SELECT Account,Currency, Cal_date FROM `Currentdata` ;

( note : vdate is the variable created in QV and linked to the calendar object, i tried using $vdate and &vdate it does not work.)

regards,

Kamal

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try '$(vdate)'


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
bruno_m_santos
Partner - Creator
Partner - Creator

Try $(vdate)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try '$(vdate)'


talk is cheap, supply exceeds demand
bruno_m_santos
Partner - Creator
Partner - Creator

If you pute =$(vdate) in a text box , what value is displayed?.

Not applicable
Author

Hi Bruno, I tried it but does not work.

Thinking some format issue, because if I use '08/11/2013' it works but using $(vdate)

Any other options ?

thanks in advance, Kamal

Not applicable
Author

Thank you Gysbert and Bruno.. it worked now

Not applicable
Author

Hi Kamal,

You are saying you create vdate when creating the calendar table? I'm just thinking vdate might not exist yet in the case you have the mastercalendar creation in the end of the script.

Otherwise I would create two new fields in the sam table, one with result of Date(Cal_date) and one with $(vdate) and check if the format seems to match.

BR,