Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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.
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.
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.
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.
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.