Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Working with multiple calendars in Qlik can be tricky—but mastering it unlocks powerful insights across your data. In this session, you’ll learn how to manage and compare different date types such as order dates, ship dates, and invoice dates within the same app. We’ll explore how to create canonical date models, use link tables, and build visualizations that let you easily switch between calendar contexts. By the end, you’ll understand when and why to use multiple calendars and how to ensure your measures and trends stay accurate, consistent, and meaningful across every view.
Sample App and data attached below
Other helpful resources:
Improved Master Calendar Script Template courtesy: Rob Wunderlich
(source: https://qlikviewcookbook.com/2015/05/better-calendar-scripts/)
Note - here you would change OrderDate to CanonicalDate - as the .qvf shows.
MasterCalendar:
Load
TempDate AS OrderDate,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
'Q' & ceil(month(TempDate) / 3) AS Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
;
//=== Generate a temp table of dates ===
LOAD
date(mindate + IterNo()) AS TempDate
,maxdate // Used in InYearToDate() above, but not kept
WHILE mindate + IterNo() <= maxdate;
//=== Get min/max dates from Field ===/
LOAD
min(FieldValue('OrderDate', recno()))-1 as mindate,
max(FieldValue('OrderDate', recno())) as maxdate
AUTOGENERATE FieldValueCount('OrderDate');
Just a quick feedback: I find the Do More with Qlik channel extremely useful, and bringing all these tips together was definitely a great decision.