Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

A Quick Script Question...

Hi,

As part of my script load I have data with a start and end date(eg, Start-1st Jan 2014, End-1st Jan 2015). I'd like to load this record against all dates between these dates, so in Qlikview if I was to select June 2014 for example, this record would be included.

Is there a simple way to autogenerate the additional dates as part of the load script?

EG, Data looks like ABC, 01Jan2014, 01Jan2015.

I want to load into Qlikview...

ABC,01Jan2014

ABC,02Jan2014

ABC,03Jan2014

ETC....

ABC,31Dec2014

ABC,01Jan2015

Hope that makes sense and thanking your in advance.

Kind Regards,

Warren

1 Solution
5 Replies
MK_QSL
MVP
MVP

Let vMinDate = NUM(Date('01/01/2014'));

Let vMaxDate = NUM(Date('01/01/2015'));

Load

  Date(Date#(Date($(vMinDate) + IterNo() - 1),'DD/MM/YYYY'),'DDMMMYYYY') as Date

AutoGenerate 1

While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);

Join

Load 'ABC' as Data AutoGenerate 1;

Not applicable
Author

Perfect - Thank you!

Not applicable
Author

Many thanks…

MK_QSL
MVP
MVP

Kindly close the thread by selecting appropriate answer so that others can also use it...