Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
BlondeThursday
New Contributor III

Add season to Master Calendar

I have a "standard" Master Calendar. I need to add a selector to select the months making up two seasons.

The seasons are Summer = May through October and Winter = November through April.

How can I set the Winter season to start in November of the year selected and select through the following April?

So, the user will select the start year (say 2018) and the season.

If they select Winter they will see data for Nov 2018 through April 2019. If they select Summer they will see data for May 2018 through October 2018.

What is the best way to accomplish this?

1 Solution

Accepted Solutions
BlondeThursday
New Contributor III

Re: Add season to Master Calendar

I think I can get there using variables for the start and end of each season, and making different versions of every chart to show a winter version and a summer version, but it would still be nice to have a selector (button?) that would just change the dates selected.

View solution in original post

5 Replies
miskinmaz
Contributor III

Re: Add season to Master Calendar

in your master calendar script try to add the flag where you will use the condition like:

if(month> Nov and month < april , 'Winter','Summer') as Season

Note: I have just jolted down the algorithm, need to add proper function and field for the requirement. 

BlondeThursday
New Contributor III

Re: Add season to Master Calendar

Thank you, but that gets me Nov, Dec, Jan, Feb, Mar, and Apr in the same year. I need from Nov of the selected year through Apr of the following year.

miskinmaz
Contributor III

Re: Add season to Master Calendar

Try this 

Load 

Month,

....

from MasterCalendar

left join

Load * Inline [

Month,Season

Nov, Winter

Dec,Winter

....

June,Summer,

...

];

the only con is that this method is not dynamic.

BlondeThursday
New Contributor III

Re: Add season to Master Calendar

I think I can get there using variables for the start and end of each season, and making different versions of every chart to show a winter version and a summer version, but it would still be nice to have a selector (button?) that would just change the dates selected.

View solution in original post

miskinmaz
Contributor III

Re: Add season to Master Calendar

It is easy to manipulate date when we are creating the field at script.

Further to the script code you can always use the button and on button click you can use the trigger to select the respective season, this in turn will change the date.