Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date interval selecton

Hi,

I'm new to QV and scripting in general. I'm trying to set up a way to select date intervals but I'm stuck. Say you want to analyse intervals before, during and after a campaign. Using listboxes is no good since the start date and end date vary and may be in the middle of a month. If I tick multiple values in general settings for the calendar object I can drag out an interval within a month but shift-select to a date several moths away won't work. I can only keep selection over to the next month by using Ctrl. That is not really a good way if you need longer intervals and I suspect there to be a much easier way to solve this kind of selections. Perhaps with two inputboxes for the start and end dates - but I have yet to figure out how they work.

(I also tried a multibox with the field TempDate from the Master Calendar, problem is it also gets stuck when draging out your selection and the selected fields are then at the top of the list, so you cant continue. I even tried using the slider object based on TempDate but with years of dates it's almost impossible to select the end date by draging out an interval because it jumps 15 dates per pixel.)

Any help is much appreciated. Thank you.

4 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi,

If you want fixed intervals (say, one month before and two after the campaign) you can specify it with Set Analysis. Otherwise you can use input boxes or two calendar objects related to different variables (star and end dates). After that, you also can use Set Analysis for specifying the range in your expression.

Cheers

Not applicable
Author

Thanks for the quick reply Villafuerte. I take it there is no standard sheet object that will work for such a selection?

villafuerte
Partner Ambassador
Partner Ambassador

Hi,

Well, since the intervals are variable it's difficult to set fixed objects. You can have a ListBox containing all the dates, but it would me difficult to manage it. Also you can group the dates by week and select hte intervals in the week level (it would be easier, but with less detail).

However, I think that having two calendar objects with vSartDate and vEndDate respectively can be a good option for your problem.

Cheers

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

At the bottom of this thread
http://community.qlik.com/forums/p/22315/102760.aspx

is EnterDateFromToV9.qvw which is an example of using two input boxes to select a date range.

-Rob