Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jleefjcapital
Creator II
Creator II

Master Calendar Interval () step error

Hello,

I'm using the following code for the master calendar.  It had worked with no problem with other data sets, but I get the following error message, when I try to use it with a particular data table (Alabama_employ).

I hope someone would be able to help me.

Thank you,

Jessica

Error message when I try to load:

Here is the master calendar code I'm using:

Here is the table I'm referencing:

1 Solution

Accepted Solutions
sunny_talwar

What you have below should have worked and should show your Jan2010 for year = 2010 and Month = 01

View solution in original post

36 Replies
sunny_talwar

MakeDate function create a date and you don't need Date#() for Qlik Sense to understand that it is a date. Try this:

Date(MakeDate(year, Right(period, 2)), 'M/D/YYYY') as DATE,

to replace this

Capture.PNG

jleefjcapital
Creator II
Creator II
Author

Great, thank you.  However, I still get the following error message - I think it's on the master calendar side.

sunny_talwar

Can you share how year and Period look in there raw formats?

jleefjcapital
Creator II
Creator II
Author

Year = 1990, 1991, etc

Period = M01, M02, etc. 

sunny_talwar

Try this out:

Date(MakeDate(year, (Right(period, 2) * 1)), 'M/D/YYYY') as DATE,

or

Date(MakeDate(year, Num#(Right(period, 2), '##')), 'M/D/YYYY') as DATE,

jleefjcapital
Creator II
Creator II
Author

I get the same error message. 

sunny_talwar

Can you just run your Alabama_employee table with all of these

Num(MakeDate(year, (Right(period, 2) * 1))) as DATE1,

Num(MakeDate(year, Num#(Right(period, 2), '##'))) as DATE2

jleefjcapital
Creator II
Creator II
Author

Yes, it loads correctly.  The problem is the master calendar step. 

vinieme12
Champion III
Champion III

Change this part, encapsulate in brackets

Autogenerate 1 while ($(varMinDate) + Iterno() - 1) <= $(varMaxDate);

calendar.JPG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.