You are on page 1of 10

Qlik Sense Qualification – Data Architect

Table of Contents

Introduction 2

Nutra Green 2
Supporting Files 2
Project History 3
Platform 4
Best Practices 4
Business Requirements 4
Activities 5

1. Need script to be error free 5


2. Need a way to migrate app from one country to another 5
3. Ability to visualize sales totals at order line level (adjusted for quantity
ordered and discount given) 6
4. Filter data by salesperson 6
5. Display product quality rating data 7
6. Add Supplier information 7
7. Monitor sales sourced from preferred (environmental friendly)
manufacturers 7
8. Show Shipment Date with each Order Line Item 7
9. Use one filter pane to select employee and consultant names 8
10. Add JobTitle filter pane that starts with CEO, CFO, CMO, Legal
Counsel (in that order) 8
11. List accurate [Unit Cost] for products 8
12. Show number of product items never ordered 8
13. Show CostOfGoodsSold (COGS) for each order 8
14. Show Margin by MonthYear 9
15. Show information on Offices that are currently occupied 9
16. Analyze Order trends against a gapless calendar 9
17. See overall sales at-a-glance in US Dollars and Euros 10

Qlik Sense Qualification Exam – Feb 2019 Release


Application Requirements

Introduction

This document describes the requirements for the application build portion of the Qlik Sense Qualification
Data Architect exam. Using the data provided and Qlik Sense Desktop or Cloud, follow the instructions
below to build an app. You will then use this app to answer questions in Qlik Sense Qualification Data
Architect exam.

Depending on your experience level, the app build portion could take up to 4 hours. This needs to be
completed prior to starting your timed exam.

Nutra Green
Nutra Green is an eco-friendly chain of convenience stores. Due to rapid growth, management has
decided to scrap their home-grown data analysis system and deploy Qlik Sense. As the data architect, it’s
your job to gather data from their existing sources and build a Qlik Sense data model that their business
analysts can use to build visualizations. Nutra Green’s old system is a patchwork of Excel files and an
Access database full of extraneous and redundant data.

Supporting Files
The application can be built using both Qlik Sense Desktop and Qlik Sense Cloud platforms.

Due to some limitations in Qlik Cloud, there are some slight variations in the steps below. Please refer to
the appropriate sections for more information.

After you download the data files from the exam page in the Qlik Continuous Classroom, extract the
DAQualData.zip file to the C:\ drive on your computer. The course files that exist in the DAQualData
folder are the following:

• Consultants.xlsx
• Customers.xlsx
• Employees.xlsx
• Environment.txt
• Manufacturers.xlsx
• NutraGreenCustomerType.xlsx
• Offices.xlsx
• Order Line Items.xlsx (exported from Sales.mdb for use with Qlik Sense Cloud)
• Orders.xlsx (exported from Sales.mdb for use with Qlik Sense Cloud)
• ProductCostComparison.xlsx
• Products.xlsx
• RegionPopulation.xlsx
• Sales.mdb (Orders, Order Line Items, Shipments – used for Qlik Sense Desktop only)
• Shipments.xlsx (exported from Sales.mdb for use with Qlik Sense Cloud)
• Suppliers.xlsx

Most of these are data files. Not necessarily all these data files are used in the activities.

In addition, there is one more file, a Qlik Sense starter app, Nutra_Green_Sales-Starter.qvf, which you
will use throughout the following activities.
Application Requirements | 2
The data files contain more data than you need to fulfill the business requirements on page 4 of this
document. Some fields exist only to cause data modeling issues such as synthetic keys. When that
occurs, handle it appropriately.

Project History
An intern working on your team has done some preliminary investigation of the available data and
observed that some fields exist in more than one place – this is what she has found so far:

Field Tables Comment

Item Desc Order Line Items, Products Item descriptions in the Order
Line Items table are truncated

Customer Number Orders, Order Line Items, Customers Data in the Order Line Items
table includes words like
Referenceable, Do not call,
15 days late, 30 days late,
etc. These don’t appear to be
Customer Numbers.

Supplier Name Products, Suppliers The text, Supplier<x>


appears for all Products in
Products.xlsx.

Item Number Order Line Items, Products

Order Number Orders, Order Line Items

Employee Number Orders, Employee

SupplierID Products, Suppliers

A data architect from a temp agency, who worked with the same data on another project, left the following
notes:

• Unable to validate some database fields in unit testing. Recommend not to use the following:

Field Table Comment

GrossSales OrderLineItems Unreliable. Do not use.

Sales OrderLineItems Unreliable. Do not use. Calculate


LineSalesAmount in the script by
multiplying Unit Sales by Sales Qty. Also,
don’t forget to deduct the Discount% from
each line sales amount.

Margin OrderLineItems Unreliable. Do not use. Calculate Margin


in the script by subtracting Unit Cost from
LineSalesAmount.

Application Requirements | 3
Platform
The exam is based on the Qlik Sense Desktop February 2019 release and, while this version is
recommended to complete this activity, you may use another version of Qlik Sense Desktop.

Qlik Sense Cloud can also be used for this activity. It is accessible from:
https://www.qlikcloud.com/. It is recommended to have registered in advance and have access
to the environment.

Best Practices
Follow best practices recommended in the Data Architect learning pathway modules in Qlik Continuous
Classroom (QCC), including:

• Modularize script into sections.


• Define all mapping tables in a separate script section immediately following Main.
• Label all tables.
• Drop working (temp) tables after use.
• Use comments in script.
• Avoid synthetic keys and circular references.
• Use naming conventions consistently.
• Use existing connections instead of creating duplicates (makes for better maintainability).

Business Requirements

1. Need script to be error free.


2. Need a way to migrate app from one country to another.
3. Ability to visualize sales totals at order line level (adjusted for quantity ordered and discount
given).
4. Filter data by salesperson.
5. Display product quality rating data.
6. Add Supplier information.
7. Monitor sales sourced from preferred (environmentally friendly) manufacturers.
8. Show Shipment Date with each Order Line Item.
9. Use one filter pane to select employee and consultant names.
10. JobTitle filter pane should start with CEO, CFO, CMO, Legal Counsel (in that order).
11. List accurate [Unit Cost] for products.
12. Show number of product items never ordered.
13. Show CostOfGoodsSold (COGS) for each order.
14. Show Margin by Month-Year.
15. Show information on Offices that are currently occupied.
16. Analyze Order trends against a gapless calendar.
17. See overall sales at-a-glance in US Dollars and Euros.

Application Requirements | 4
Activities

Complete the following activities to build a data model that can support the stated business requirements.
NOTE: A large portion of the questions on the Qlik Sense Qualification exam will be based on the
activities below. These activities will require you to develop script and build visualizations to support the
stated business requirements. Not all activities will need a supporting sheet in your app, but for those that
do, you will find it useful to group your visualizations so that all charts, filter panes, etc. that pertain
to a particular activity appear on one sheet. This will make it easier to answer the exam questions
later. You will also want to keep track of any data-loading issues you encounter as you build the app
because the exam will include questions on those issues.

1. Need script to be error free

For Qlik Sense Desktop

Copy the Nutra_Green_Sales-Starter.qvf app from C:\DAQualData to your Qlik Sense Apps folder. This
app has several syntax errors that need to be fixed.

For Qlik Sense Cloud

Before starting working on your Qlik Sense app, complete the following steps:

1. Upload all the files (except Sales.mdb) on your personal Data files area on Qlik Cloud. You
should have 14 uploaded files in total in your personal data files area.

2. In your My work stream, create a new app and upload the Nutra_Green_Sales-Starter.qvf file,
located in the data files you downloaded earlier.

3. Since the current version of Qlik Sense Cloud does not accept Access databases, the script
under the Facts section that loads the Orders table is not valid. Replace it with a new statement
that loads the Orders table from the Orders.xlsx file, using the existing data connection.

Fix the rest of the syntax errors, so that the Orders and Customers tables load successfully.

NOTE: The exam will include questions on the nature of the errors that you fixed.

Suggested visualization(s): None.

2. Need a way to migrate app from one country to another


Build in the ability to migrate your app from one country to another and easily adopt local numeric and
date formats by replacing the hard-coded Environment Variables in the Main script section with a
statement that includes the file, Environment.txt. This will establish US formats for this app instead of the
Great Britain formats originally specified. Don’t forget to comment out the existing Environment Variables
before using the INCLUDE statement.

Suggested visualization(s): Display Order Date in a filter pane to test your results. Review the existing
Test money sheet to verify that the given amount is now in USD.

Application Requirements | 5
3. Ability to visualize sales totals at order line level (adjusted for quantity ordered and
discount given)
Modify the data load script to add data from the Order Line Items table.

For Qlik Sense Desktop

If you are using Qlik Sense Desktop, this table is located in the Sales.mdb database.

For Qlik Sense Cloud

If you are using Qlik Cloud, the table can be found under Data files area in the Order Line Items.xlsx file,
since it has been uploaded earlier.

If you get a synthetic key, handle it appropriately. Create a field, LineSalesAmount in table
OrderLineItems, using the following expression:
`Unit Price` * `Sales Qty` * (1 - Discount)

Suggested visualization(s): Display LineSalesAmount in a filter pane to view your results.

4. Filter data by salesperson


Employees.xlsx contains employee names and job titles for 98 employees. Load all 98 employees into
the Employees table. Combine [First Name] and [Last Name] (separated by a space) to create a new
Name field.

Next, load from the RESIDENT Employees table into a new SalesPerson table. Load only [Employee
Number], Name AS SalesPerson and JobTitle AS SalesTitle, and only those employees whose
“Employee Number” exists in the Orders table. This fits our definition of a sales person as someone who
is associated with an order record in the Orders table. Here are two more hints to help you get this done:

a) Create a copy of “Employee Number” in the Orders table and name it EmpSalesNum:

"Employee Number" AS EmpSalesNum,

b) Use this EmpSalesNum field to restrict the records loaded into the SalesPerson table from the
RESIDENT Employees table:

WHERE EXISTS(EmpSalesNum,"Employee Number");

Suggested visualization(s): Table with dimensions SalesPerson and SalesTitle and measure
SUM(LineSalesAmount). Format the measure column appropriately.

Application Requirements | 6
5. Display product quality rating data
Load Products table from Products.xlsx. This table includes a QualRating column with values from 1 to 5
assigned by an independent quality rating organization. You’ll have to solve the problem caused by the
structure of the Excel file so that Products and OrderLineItems associate on Item Number. If you get a
synthetic key, handle it appropriately.

The Products table also contains a SupplierName field with incorrect values. At this point this field is not
needed. Don’t load it.

Suggested visualization(s): Add a chart that can help analyze number of orders that include a top rated
(5) product – one possibility would be a bar chart that shows a distinct count of Order Number by
QualRating.

6. Add Supplier information


Load the Suppliers table from Suppliers.xlsx. This table contains a SupplierName field with correct
values. Load this table and join the table to Products so that only the values with an existing SupplierID in
the Products table are added.

Suggested visualization(s): Add a table that verifies that all the existing products are associated with a
supplier. Additionally, add a filter pane to verify that all the Suppliers have been loaded to the data model.

7. Monitor sales sourced from preferred (environmental friendly) manufacturers


Load Manufacturers data from Manufacturers.xlsx. Use QUALIFY to solve any data association issues.

Suggested visualization(s): Build a bar chart that shows total of line sales amount by the manufacturers’
green ratings. Add a Customer filter pane. Add KPI object to show a distinct count of orders.

8. Show Shipment Date with each Order Line Item


Load the Shipments table and handle the synthetic key appropriately.

For Qlik Sense Desktop

If you are using Qlik Sense Desktop, this table is located in the Sales.mdb database.

For Qlik Sense Cloud

If you are using Qlik Cloud, the file can be found under My data files area in the Shipments.xlsx file,
since it has been uploaded earlier.

Suggested visualization(s): Build a table in sheet view that shows Order Number, Order Line No, Order
Date, Shipment Date and the difference between the two dates. Sort descending by the difference
column to see the longest lag time between order and shipment.

Application Requirements | 7
9. Use one filter pane to select employee and consultant names
Load Consultants.xlsx. The consultants’ first and last names must be combined in the script using the
same statement as in the Employees table. Add the appropriate script command to append all records
from the Consultants table to the bottom of the Employees table.

Suggested visualization(s): None.

10. Add JobTitle filter pane that starts with CEO, CFO, CMO, Legal Counsel (in that order)
To specify a custom sort for the JobTitle filter pane, create a temporary table named SortJobTitle early in
the script that establishes the order of the JobTitle values as CEO, CFO, CMO, Legal Counsel. When the
actual data is loaded from the Employees table later in the script, the remaining titles will be appended to
this list in load order. Don’t forget to drop the temporary table after the actual JobTitle values are loaded
from the Employees table.

Suggested visualization(s): Add a filter pane for JobTitle and adjust the sorting property so that it
reflects the data load order.

11. List accurate [Unit Cost] for products


Create a new script section, named Validation, at the end and load ProductCostComparison.xlsx.

Suggested visualization(s): Add a table to compare [Product Group], [Item Desc], SUM([Unit Cost]),
SUM([Orig Unit Cost]) and the variance between the actual unit cost and the original unit cost of the
product side by side. Sort by the variance to see which product cost calculations are not aligned.

12. Show number of product items never ordered


One of the metrics required by marketing management is number of products in our catalog that have
never been ordered. You will first have to create a new counter field, ProductIDsOrdered, in one of your
Qlik Sense tables, then demonstrate that the counter works by displaying it in a Text & image or KPI
object.

Suggested visualization(s): KPI object that shows the difference between a DISTINCT count of all items
available and a DISTINCT count of ordered items.

13. Show CostOfGoodsSold (COGS) for each order


At a high level, your solution for this activity will require the following: 1) Create a mapping table early in
the script; 2) Add a line in the OrderLineItems table load statement which uses the ApplyMap function to
retrieve the Unit Cost for a given Item Number and multiplies it by Sales Qty to calculate the COGS for
each line item.

Step-by-step solution:

• Create a new script section, named Mapping, immediately following the Main section
• In the new script section, create a mapping table from Products.xlsx. If your connector has the
name DAQualData, your script should resemble the following:
Application Requirements | 8
UnitCost_Map:

MAPPING LOAD

Number AS "Item Number",

"Unit Cost"

FROM [lib://DAQualData/Products.xlsx]

(ooxml, embedded labels, header is 3 lines, table is Products);

• Add COGS to the OrderLineItems load statement with script that resembles the following:

APPLYMAP ('UnitCost_Map', "Item Number", 0) * `Sales Qty` AS COGS

Suggested visualization(s): Add a table that shows SUM(COGS) by Order Number.

14. Show Margin by MonthYear


• Create a master dimension, MonthYear in the Data Model Viewer using the following expression:
Date(MonthStart([Order Date]), 'MMM-YYYY')

• Create a master measure, Margin, in the Data Model Viewer using the following expression:
Sum(LineSalesAmount) - Sum(COGS)

Suggested visualization(s): Create a line chart that uses the Margin master measure and MonthYear
master dimension you created. Create a table with MonthYear, Order Number, Item Number, Item Desc
as dimensions, and SUM(LineSalesAmount), SUM(COGS), and Margin as measures. Format the table
measures accordingly.

15. Show information on Offices that are currently occupied


• Load Offices.xlsx and join Offices to Employees in such a way that only those offices that have
employees are included

Suggested visualization(s): Add a filter pane that shows OfficeCity.

16. Analyze Order trends against a gapless calendar


• Create a new script section at the end and name it Calendar
• The following script components are provided to help you, but you must reassemble them in the
correct order in the Calendar script section of your app
o // Drop tables
DROP TABLES StartAndEndDates, TempCal;

o // Capture date range in variables


LET vFirstDate = NUM(PEEK('FirstOrderDate', 0, 'StartAndEndDates'));
LET vLastDate = NUM(PEEK('LastOrderDate', 0, 'StartAndEndDates'));

Application Requirements | 9
o // Get date range from orders
StartAndEndDates:
LOAD
MIN([Order Date]) AS FirstOrderDate,
MAX([Order Date]) AS LastOrderDate
RESIDENT Orders;

o // Create date attributes for master calendar


MasterCalendar:
LOAD
TempDate AS [Order Date],
WEEK(TempDate) AS Week,
YEAR(TempDate) AS Year,
MONTH(TempDate) AS Month,
DAY(TempDate) AS Day,
WEEKDAY (TempDate) AS Weekday,
'Q' & CEIL(MONTH(TempDate) / 3) AS Quarter,
WEEK(TempDate) & '-' & YEAR(TempDate) AS WeekYear
RESIDENT TempCal;

o // Auto-generate gap-less calendar


TempCal:
LOAD
DATE($(vFirstDate) + ROWNO() -1) AS TempDate
AUTOGENERATE
$(vLastDate) - $(vFirstDate) + 1;

Suggested visualization(s): Add a bar chart that shows order activity as SUM(LineSalesAmount) by
Weekday. Add filter panes for Year and Month from the MasterCalendar. Add table with dimension
SalesPerson and measure SUM(LineSalesAmount). Add an Order Date filter pane to prove there are no
gaps in the dates.

17. See overall sales at-a-glance in US Dollars and Euros


The data sources use US Dollars as the base currency for sales amounts. You also need to show sales
amounts in Euros based on the exchange rate on a particular date. Use Add data to load 3x3 currency
exchange rates from the Essentials Free collection of Qlik DataMarket for all time. Note: Do not force
associate the DateTime field in DataMarket’s currency exchange table with any other date field.

Suggested visualization(s): Add a KPI object that shows the sum of LineSalesAmount in US Dollars and
Euros side by side. Add a filter pane for DateTime – this is a field that is loaded from Qlik DataMarket
along with the exchange rates. Also add a filter pane for Customer. Note: The KPI object will calculate
Euros only if a single value is selected from the DateTime filter pane.

Application Requirements | 10

You might also like