Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
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?

1 Solution
4 Replies
JonnyPoole
Employee
Employee

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.

jim_chan
Specialist
Specialist

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.