Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Default set date range

Hi All,

Whenever i open the document by default i want to show only those dates falling one week before and  after the current date.

later on user can select his date range.

How can i restrict default selection?

THnak you

Regards,

Prajna

1 Solution

Accepted Solutions
Not applicable

Re: Default set date range

In your load script add

LET vMinDate = Date(Today()-7,'DD/MM/YYYY');

LET vMaxDate = Date(Today(),'DD/MM/YYYY');

Set an on open trigger in the document settings and set field to select between that range.

9 Replies

Re: Default set date range

With a trigger,

go in settings->document properties -> trigger -> add (on Open)

hrlinder
Honored Contributor

Re: Default set date range

you should use trigger. goto settings, Document Properties, Triggers and on open and define your trigger

for the required dates

hope that helps

Not applicable

Re: Default set date range

In your load script add

LET vMinDate = Date(Today()-7,'DD/MM/YYYY');

LET vMaxDate = Date(Today(),'DD/MM/YYYY');

Set an on open trigger in the document settings and set field to select between that range.

bertdijks
New Contributor III

Re: Default set date range

Example in which the selected Year is set to the year of last month:

2014-04-23 14_58_15-QlikView x64 - [C__Users_bert.I3BV_Documents_Klanten_CIF_QVData_PRD_CIF_CIF Mana.png

Not applicable

Re: Default set date range

hi,

i created above variables

LET vMinDate = Date(Today()-7,'DD/MM/YYYY');

LET vMaxDate = Date(Today()+7,'DD/MM/YYYY');

after that in document prop on open

took action ---> select in field----> datefield---->= '>=' vMinDate & '<=' & vMaxDate

but m not getting till only currnet date... why is it so?

Regards,

Prajna

Not applicable

Re: Default set date range

You have +7 to max date you only need that to say Today() not Today()+7

Not applicable

Re: Default set date range

yeah.. but i want data for one week before and one week after current date

em getting still the same if i use today() instead of today()+7

Regards,

Prajna

Not applicable

Re: Default set date range

Hey, I am stuck on the same issue in Qlik Sense. Could you help me with it?

bertdijks
New Contributor III

Re: Default set date range

With the default selections in QlikSense this is not possible; maybe with certain extensions

Community Browser