Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Qlik Master Calendar Script
TempDate AS [Issue Datum],
Year(TempDate) As Jahr,
Month(TempDate) As Monat,
monthname(TempDate) as [Monat Jahr],
Day(TempDate) As Tag,
'Q' & ceil(month(TempDate) / 3) AS Quartal,
'Q' & ceil(month(TempDate) / 3) & ' ' & Year(TempDate) AS [Quartal Jahr],
Dual('KW' & Week(weekstart(TempDate)), Week(weekstart(TempDate))) as Woche,
Dual('KW' & Week(weekstart(TempDate)) & ' ' & WeekYear(TempDate), weekstart(TempDate)) as [Woche Jahr],
WeekDay(TempDate) as WeekDay
//=== Generate a temp table of dates ===
date(mindate + IterNo()) AS TempDate
,maxdate // Used in InYearToDate() above, but not kept
WHILE mindate + IterNo() <= maxdate;
//=== Get min/max dates from Field ===/
min(FieldValue('Issue Datum', recno()))-1 as mindate,
max(FieldValue('Issue Datum', recno())) as maxdate
AUTOGENERATE FieldValueCount('Issue Datum');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment