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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create year-based Master Calendar - help

Hi everyone,

I need to create a very simple master calendar, but don't know how. I have two tables, [Systems] and [Platforms]. Systems table has years 2010-2025 in field SystemsYear, while Platforms table has years 2001-2025 in field PlatformYear.

I want to create a new table and field 'Year' for the period 2010-2025 as my master calendar. I do not care about data before 2010. What does the script look like for this?

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this:

Years:

LOAD distinct

     SystemsYear as Year,

     SystemsYear

Resident Systems;

concatenate(Years)

LOAD distinct

     PlatformYear as Year,

     PlatformYear

Resident Platforms

WHERE PlatformYear >=2010;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like this:

Years:

LOAD distinct

     SystemsYear as Year,

     SystemsYear

Resident Systems;

concatenate(Years)

LOAD distinct

     PlatformYear as Year,

     PlatformYear

Resident Platforms

WHERE PlatformYear >=2010;


talk is cheap, supply exceeds demand
its_anandrjs
Champion III
Champion III

Hi,

Try with

Systems:

LOAD

SystemsYear

From Location;

//If you want only System Year Here you get Years from 2010 - 2025

MasterCalendar:

Load

SystemsYear as Year

Resident Systems;

Note:- If you need the PlatformYear also then concatenate that table to this table also

Regards

Anand

Not applicable
Author

Thank you both for your responses. Your methods actually generated a loop, I am not sure why. So I instead renamed both SystemsYear and PlatformYear to 'Year' first in the script, then edited your script slightly. So now the three tables are just linked by Year.