Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

How to select multiple date fields?

Hi everyone,

In my QVW, I have several fields for date. They are dates for different things: Assembly Date, Order Date, Delivery Date, etc.

I want to create a list box where the user can select a year or several years, and then populate a table with everything that happened in that time period. So if the user selected the year 1996, they could see everything that had been assembled, ordered, and delivered in 1996.

I do not want to just give all the date fields the same name, as I am worried that will create circular reference problems. Does anyone know of other solutions?

Tags (2)
1 Solution

Accepted Solutions
4 Replies
Employee
Employee

Re: How to select multiple date fields?

How many Date fields ? If you have already combined the data into 1 table, you could build a calendar lookup like this:

OriginalFact

load

     Date1,

     Date2,

     Date3,

     *

from <source>

NewFact

load

     Date1 as CommonDate,

     Date1,

     Date2,

     Date3

resident OriginalFact;

concatenate (NewFact)

load

     Date2 as CommonDate,

     Date1,

     Date2,

     Date3

resident OriginalFact;

concatenate (NewFact)

load

     Date3 as CommonDate,

     Date1,

     Date2,

     Date3

resident OriginalFact;

drop table OriginalFact;

and then add your year , month and other calculations off the 'CommonDate' field...preferably in a calendar table.

MVP
MVP

Re: How to select multiple date fields?

jim_chan
Contributor III

Re: How to select multiple date fields?

I have tried the tutorial and wanted to apply it in Qlik Sense, i noticed, qlik sense does not support....subroutine scripts..

i am facing multiple dates data , but my development is using qlik sense.