Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
random_user_3869
Partner - Creator III
Partner - Creator III

Create a subroutine with a master calendar in qlik saas

Hello everyone,

 

I would like create a subroutine using the type of master calendar below to use it in other qlik sense saas application:

Tablename:
Load SalesDate
From TableSource;


MasterCalendar:
Load
Date(SalesDate) As SalesDate,
Year(SalesDate) As Year,
'Q'&Ceil(Month(SalesDate)/3) AS Quarter,
Month(SalesDate) As Month
Week(SalesDate) AS Week;

Load
Date(MinDate + IterNo()-1) AS SalesDate
While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load
Min(Date(SalesDate)) As MinDate,
Max(Date(SalesDate)) As MaxDate
Resident Tablename;

 

But i don't really know how to use it as depending on many application the datefield would be different.

And i would like to have a qualify in front of the calendar field.

Thank you

Labels (1)
1 Reply
E_Røse
Creator II
Creator II

Try to add the table with the date field in the data manager, and set the field type to date. Then qliksense will autogenerate derived calendar fields for you.