You are on page 1of 4

Learning module: Generating a Master Calendar

Exercise - INSTRUCTIONS
Using the example download files on the right, you will practice working with a Example Download
calendar – first by filling in missing dates acquired from measure data, and second
The example files provided for this
by looking at a fiscal calendar example.
exercise, two Access .mdb format
databases, and two .qvw files, are
zipped into an archive file which is
available for download from the
course site. Extract the files from
Fill in missing dates the zip archive and place them in a
 Open Power Company Analysis – practice in QlikView Desktop location on your local hard drive.

 On the XYZ Power Generation sheet, scroll to the very end of the line Here are the files used in this
exercise assignment:
chart and notice the dip and subsequent climb in activity near the end of
the year Power Company Analysis –
practice.qvw
Pre-existing application with
power-generation data and a line
chart showing the trend of
Megawatt-hours produced by
day.

ValidatingSOP.mdb
Contains numerous tables
centering on sales order
processing of a fictitious
company.

SOP Order Analysis –


practice.qvw
Pre-existing application with
fictitious sales order data and a
line chart showing the trend of
sales by month.

 Open the Script editor and click the tab, “RawData”

 Scroll down to around line 278 and observe that the Megawatt hours per day production data is
entirely missing for October and November 2016. This gap in the dates provides a misleading
impression of the power-generation activity

 Now click the tab, “Calendar”

 Press Ctrl + A to select all the text, then right click the selection and click Uncomment. This
activates the script to generate a gapless calendar using the following three steps:

o Determine the required date range

o Generate a temporary calendar, using the date range boundaries acquired


o Generate the master calendar table
©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.
 Click Reload and then return to the XYZ Power Generation sheet. Scroll to the right on the chart,
if required. With the missing dates filled in, we now see that the dip in activity in the last two
weeks of September was a precursor to a complete shutdown, either intentional or due to a
malfunction

Fiscal year
A common situation in Business Intelligence is that an organization uses a financial year (fiscal year)
different from the calendar year. This implies a number of additional requirements in the QlikView
document: The most obvious is that the year used in all charts and reports must correspond to the
fiscal year which runs over a different set of dates than the calendar year.

 Open the file SOP Order Analysis – practice in QlikView Desktop


 Analyze the “Orders Analysis” sheet and notice the Calendar months run from January to
December
 Open the Script editor and ensure you are on the “Main” tab.

 Uncomment the statement on line 19 to activate the variable that sets the first month of the fiscal
year to month 4 (April)

 Click the “Fiscal Calendar” tab

©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.

Exercise instructions | page 2


 Select lines 2 through 9 and then right-click the selected text. Click uncomment from the shortcut
menu to activate the two preceding load statements that do the following:

o Create intermediate numeric values fYear and fMonth

o Create dual values FYear and FMonth. Dual values have a display value and an
underlying number which facilitates sorting

 Click Reload

 Close the Script Editor to return to the Orders Analysis sheet. Resize the line chart, to half its
current height and place it in the upper half of the sheet.

 Right click the chart and select “Clone”

 Position the new copy underneath the old one, so that they are both visible

 Right click the bottom chart and go into the properties. Switch to the dimensions properties page.

 Remove the CMonth and CYear dimensions

 Replace them with FMonth and FYear

 Change the dimension labels as follows:

o FMonth -> Fiscal month

o FYear -> Fiscal year

 Click the General tab and change the title to Orders Analysis – fiscal year

 Click OK for the chart properties and compare the two charts

 Re-open the Script editor and click the “Main” tab

 On line 19, change the 4 to a 6

 Click Reload

 Close the script editor to return to the Orders Analysis sheet and notice that the second chart now
spans months June through May

©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.

Exercise instructions | page 3


In this exercise, you saw the limitations of acquiring dates for a calendar from transaction data and
practiced generating a Master Calendar dimension table. You also modified an existing calendar to
support fiscal year.

©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.

Exercise instructions | page 4

You might also like