Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Filters to a default Date Range

Hello,

I have a slider/Calendar Object on a dashboard. I would like this, by default, to show a specific date range. From my reading, it says i can possibly build a macros to do this, however I do not have any experience in building a macro in Qlikview. Is there an easier way to do this right in the slider/calendar properties?

1 Solution

Accepted Solutions
sunny_talwar

How about this:

='>=' & Date(WeekStart(Max(Date))) & '<=' & Date(WeekEnd(Max(Date)))

View solution in original post

12 Replies
sunny_talwar

You can use a on-open trigger to do this may be.

Not applicable
Author

Thank you Sunny,

Are you able to provide me an example or point me to instructions on how to do this?

Anonymous
Not applicable
Author

Hi

Included the video in powerpoint (2013) and example (qvw) as well

Not applicable
Author

Thank you,

I see you have two calendar objects to show a date range, I want to show last week's date range on a slider by default. Is there a way I can do this?

boorgura
Specialist
Specialist

on_open_trigger.JPGYou can set the default range in the field as an "on open trigger".

document properties --> triggers tab --> Add an action for OnOpen Trigger

in the action --> select in Field --> specify the field name and appropriate selection criteria.

Not applicable
Author

Thank you,

So the set up of my dashboard is as follows:

I have three tabs, all displaying data from different data sources. On each of the tabs, I need to show the date range of the week prior. Each data source has a different date field so I believe  I will need to create three different triggers so each of the tabs opens up with the correct date range. Would that work?

boorgura
Specialist
Specialist

Instead of document trigger - you will have to do a sheet trigger.

Sheet Properties --> Triggers Tab

Not applicable
Author

Thank you!

So my

Field under the add Action is 'Date'

And my Search String is:

=('>='& Date(WeekStart(Max(Date))) & '<=' & Date(WeekEnd(Max(Date))))


However this does not seem to work. I am not getting an error, however the filter is not automatically applied to the slider object.

boorgura
Specialist
Specialist

Try not using the &

Usually search string would be like this:

>=1/1/2016 <=2/28/2016