Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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!
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
HI @ehd80 ,
Can you please share the error which you are getting?
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!
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