Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Qlik Master Calendar Script
Kalender:
Load
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 ===
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('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
You can’t perform that action at this time.