Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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!

Tags (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Create year-based Master Calendar - help

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
3 Replies
Gysbert_Wassenaar
Not applicable

Re: Create year-based Master Calendar - help

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
Not applicable

Re: Create year-based Master Calendar - help

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

Re: Create year-based Master Calendar - help

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.