Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

date ranges

I have a table with products that has START_DATE and END_DATE fields. I also have many other related tables with the same START_DATE and END_DATE. I need to have an ability to filter and count my items depending on a specific Year and a specific Quarter. I am thinking to have in inline table that would identifies Years and Quarter(how?) and then link it somehow (how?) to the real tables. But I need to know that a chosen Year is inside of the range between START_DATE and END_DATE. Any Ideas how to do that?

Thanks a lot.

1 Solution

Accepted Solutions

date ranges

6 Replies

date ranges


Take a look at this file and see if that fits into your requirements. In short, I've used two slider objects one for the starting date the other for the end date, that store both values into variables. Then these variables are used in the expressions as a part of a set analysis.

Hope that helps.

Not applicable

date ranges


If you work into your code:

Year (***Yourdatefield***) AS Year,


(***Yourdatefield***) AS Month, [\code]
Then you can define with an inline
month, Qtr
Then you can use the Qtr and Year field as a selection. If you concatenate the year and qtr (201001,201002,201003....) then you can select more than one quarter over more than one year in your slections. Otherwise, if you select Q1 and 2009 &2010, You'll be selecting Q1 from both years.
- Ronnie

Not applicable

date ranges

Thank you. It is a big help. Still in my main table I have two fields Start_date and End_date. For instance start_date is 1/1/2007 and end date is 5/8/2008. When I need to know how many products were available on 2/2/2007 - I would need to include this in my count and filter product table as the 2/2/2007 is in the range. But if i need to know how many were available on 2/2/2010 I would not include this in the calculation

Thank you

Not applicable

date ranges

It looks to me that I would need to dynamically create a cross reference table between my product table and master calendar table. This new table would need to have an Product id and Master calendar id udder condition that the start date and end date of the product provide the range where a particular date from the master calendar falls into.

I think I have a good idea but do not know how to write it correctly. Thank you.

date ranges

Not applicable

date ranges

Thank you for the links. I used the calendar and IntervalMatch to create a join table betwen calendar and my product table with the start and end dates.


( CalendarDate ) load startdate, enddate resident product;

Community Browser