Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

Master Calendar with Sequence Dates

Hi,

I have created the master calendar by using start date and end date.But  the requirement is while generating master calendar I have to generate sequence of dates like 01/01/2019,03/01/2019,05/01/2019,07/01/2019,09/01/2019 etc.....instead of all dates.

 

Any suggestions please.

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

Try this:

TempCalender:
LOAD * Where Mod(TempDate, 2) = 0
;
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;

Bests,

Jaime.

View solution in original post

3 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

It may depend on how you create your Master Calendar. Can you share the code of your Calendar?

A possible idea if you want to test it yourself: add a "Where" clause in your Master Calendar with something like

Where Mod(Date, 2) = 1

This condition will generate a sequence like the one you suggest.

Bests,

Jaime.

grajmca_sgp123
Creator
Creator
Author

Here is logic I have used for calendar , If we add where condition as you suggested its throwing error.
TempCalender:
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

Try this:

TempCalender:
LOAD * Where Mod(TempDate, 2) = 0
;
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;

Bests,

Jaime.