Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ehd80
Contributor
Contributor

Master calendar

Hi everyone,

I'm new to Qlik Sense and struggling with creating a master calendar. I seem to be able to create one, but it isn't linking correctly to the SysCreated date field. Could anyone help me with the script below? 

 

main_table:


LOAD
[ID],
[SysCreated],
[OrderNumber],
[MsCheckIsOk],
[Remarks],
[ShopName]
FROM [lib://AttachedFiles/main_table.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);

CalendarMaster:

LOAD
Date(SysCreated) AS SysCreated,
Year(SysCreated) AS Year,
'Q' & Ceil(Month(SysCreated) / 3) AS Quarter,
Month(SysCreated) As Month,
Day(SysCreated) As Day,
Year(SysCreated) & 'W' & Week(SysCreated) As YearWeek;

Load Date(MinDate + IterNo() -1 ) AS SysCreated While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load
Min(SysCreated) AS MinDate,
Max(SysCreated) AS MaxDate
RESIDENT main_table;

2 Solutions

Accepted Solutions
ehd80
Contributor
Contributor
Author

Hi Abhijit, 

I'm not getting any errors when running the script, but got empty months when creating charts.

For now this seems to have solved my issue: DayName([SysCreated]) as SysCreated, probably because SysCreated is in a datetime format (MM/DD/YYYY h:mm:ss)?

Anyways, thanks for helping!

View solution in original post

Joseph_Musekura
Support
Support

Hi @ehd80 ,
Happy to hear that you solved the issue.
In addition, take a look at this link https://community.qlik.com/t5/QlikView-Documents/How-to-create-a-Calendar/ta-p/1491361
It is a Qlikview demo but it inspired me when I was learning how to create a calendar.
/joseph

View solution in original post

3 Replies
abhijitnalekar
Specialist II
Specialist II

HI @ehd80 ,

Can you please share the error which you are getting?

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
ehd80
Contributor
Contributor
Author

Hi Abhijit, 

I'm not getting any errors when running the script, but got empty months when creating charts.

For now this seems to have solved my issue: DayName([SysCreated]) as SysCreated, probably because SysCreated is in a datetime format (MM/DD/YYYY h:mm:ss)?

Anyways, thanks for helping!

Joseph_Musekura
Support
Support

Hi @ehd80 ,
Happy to hear that you solved the issue.
In addition, take a look at this link https://community.qlik.com/t5/QlikView-Documents/How-to-create-a-Calendar/ta-p/1491361
It is a Qlikview demo but it inspired me when I was learning how to create a calendar.
/joseph