Dynamically filtering by From/To dates

Quite often, users who are not quite familiar with the QlikView way of making selections, will ask for a From/To date selection option that they are used to from their previous reporting solutions.

We can do this using a couple of variables and an Action applied to a button.

Getting ready

Load the following script:

Load
  Date(TempDate) As Date,
  Year(TempDate) As Year,
  Month(TempDate) As Month,
  Date(MonthStart(TempDate), 'YYYY-MM') As YearMonth,
  (Year(TempDate) + Month(TempDate) + Day(TempDate)) * Rand() As Sales
  ;
Load
  RecNo()-1+Floor(MakeDate(2012)) As TempDate
AutoGenerate(730);

How to do it…

These steps will show you how to dynamically filter by From/To dates:

  1. Add a new variable to the vStartDate document with ...

Get QlikView for Developers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.