Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
In discussions I could not find how to create master calendar in Qlik Sense.
Does anybody knows how to do this?
Thanks in advance.
Vidas
Hi
I expect you would use the same script as creating a calendar in Qlikview. There are many examples here in the community for Qlikview.
HTH
Jonathan
Plenty of sample master calendars in this forum.
To prove the point of load script compatibility between QlikView and Qlik Sense, I've ported several different QV apps over to Sense. Works great, except for the data connectors that have to be changed to Sense's new syntax. That's a minor issue though.
I actually used a master calendar in a post earlier today to exemplify QlikView to Qlik Sense script portability, small world.
HI Vidas,
In this post I have attached a qvf file with a simple calendar table example.
http://community.qlik.com/message/694711#694711
Worth having a looking into using QDF which has a simple function to create calendar tables.
Thanks
Mark
www.techstuffybooks.com
Hi,
Please check below link for Master Calendar script
Master Calendar Generation Script
Script is common to both Qlikview and Qliksense, so you can use the same script for Qliksense also.
Regards,
Jagan.
Hi,
If you got the answer please close this thread so that it would be helpful to others to easily find the solution.
Regards,
Jagan.
Quartersmap:
Mapping Load
RowNo() as Month,
'Q' & Ceil(RowNo()/3)as Quarter
AutoGenerate (12);
Halfyearsmap:
Mapping Load
RowNo() as Month,
'HY' & ceil(RowNo()/6) as HalfYear
AutoGenerate (12);
Temp:
LOAD
Min(Opendate) as Mindate,
Max(Opendate) as Maxdate
Resident Main;
LET vmindate= Num(Peek('Mindate',0,'Temp'));
LET vmaxdate= Num(Peek('Maxdate',0,'Temp'));
DROP Table Temp;
Calendar:
LOAD
$(vmindate) + IterNo() -1 as Num,
Date($(vmindate) + IterNo() -1) as Date
AutoGenerate 1
While
($(vmindate) + IterNo() -1)<= $(vmaxdate);
Master_Cal:
LOAD
Floor(Date) as Opendate,
Year(Date) as Year,
ApplyMap('Quartersmap',Month(Date),Null()) as Quarter,
ApplyMap('Halfyearsmap',Month(Date),Null()) as HalfYear,
Month(Date) as Month,
MonthName(Date) as MonthName,
Day(Date) as Day,
YearToDate(Date) as YTD,
Week(Date) as Week
Resident Calendar;
DROP Table Calendar;
Sorry for necro, but how do I map several date fields on that calendar ?
For example I have opening_date, closing_date, modified_date fields ; how do I use the master calendar to map them ?
Create a different calendar for each date field you want to have a calendar attached to, naming them differently, and using the Date field from each date dimension to join to each separate calendar.
You can have multiple calendars in your app.