Data Visualisation Workshop - QlikSense
Data Visualisation Workshop - QlikSense
Qlik Sense®
Contents
Slide
Visualisation process 6
®
Introduction to Qlik Sense 15
Installation process 19
®
Qlik Sense basics 21
®
Qlik Sense user interface 47
Hands on exercise - CORDIS 58
®
Qlik Sense other features 118
Hands on exercise – Problem Solving 122
Individual projects & Presentation 133
• Who am I?
- Name
- Business
- Etc.
• Which data am I working with?
• What experience do I have with Qlik Sense or other visualisation
tool?
• What would I like to learn?
1 2 3 4
Formulate the Collect and Consider Develop visual
question prepare data medium representation
• When creating a visualisation, the first step should always be to clearly state the
question to be answered.
• By being conscious of the answer we need, we can more effectively choose the
data required to answer it.
• A common mistake is to dive head first into all the available data and end up
losing the initial goal and over-complicating a rather simple process.
1
Formulate the
question
Prepare Data
After collection some additional data
preparation might be required. Here it is
important to check if amongst others:
• Additional computed variables need to
be created
• Filtering on the data is needed
• Links between different datasets are
required
• Etc.
2
Collect and
prepare data
Quantitative Qualitative
2
Collect and
prepare data
In order to choose a good medium a couple of questions should be asked. Some examples
could be:
• Will the visualisation be printed or digital?
In print we have a set space that we can predefine, while digitally we have to take
into account how it will look on different screen types and sizes.
In print the colour output can be tested and set, but digitally colours can appear
differently from screen to screen, and ruin the outcome.
Consider
medium
®
The software used for this workshop is Qlik Sense Desktop.
To install it:
1. Navigate to the following website:
http://www.qlik.com/try-or-buy/download-qlik-sense
2. Fill in the form and click “Download Now”;
3. Once downloaded, run the installer and install the client.
®
• Making selections is the main interaction method in Qlik Sense . Selections filter
®
out a subset of the data that is loaded into Qlik Sense .
• Multiple selections over different visualisations are connected with an AND logical
relationship. This means that data displayed will be only that which fits all
selections.
Complete dataset
Filter 1
Filter 2
• This means that the more selections one makes the more he refines the focus of his
selection.
®
In Qlik Sense there are three colours when it comes to selection:
• indicates selected values;
• indicates associated values;
• indicates non-associated values.
®
• The main component of Qlik Sense is
the App.
• An app is made up of a combination of:
• Sheets containing data objects (i.e.
measures, dimensions, variables
and visualisations);
• Bookmarks;
• and Stories.
Example of an app
• A sheet is where the data objects are placed. An app can include several sheets.
• Every sheet can be viewed in its edit view for editing and its done view for
exploration and analysis.
• Remember! The various sheets in an app are connected to each other. This means that
selections you make one sheet affect the visualisations on the other sheets as well.
Qlik Sense® includes chart items which are what you use to create
visualizations.
Often you can convert from one chart to another while keeping all values and
data untouched. This helps when you want to view a visualisation from a
different perspective.
®
Qlik Sense provides a diverse set of visualisation types to display data according to the
needs of each circumstance.
Bar charts
Combo charts
Line charts
Scatter plots
Pie charts
KPIs
Gauge
Tree map
Bar chart
• It is used to compare items and data over time.
• Grouping and stacking bars makes it easy to visualize more than one measures.
• It is used to visualise the different values of a measure in different categories.
Line chart
• It is used to display trends and compare changes over time. It is best used when the
horizontal dimension is evenly spaced, such as the case with months, quarters, or
fiscal years.
Combo chart
• It combines absolute and relative values by combining features of the bar chart and
the line chart.
• You can use bars and lines to represent different categorical groups in the same
visualization.
Scatter plot
• It is best used when you are trying to display the distribution and relationship of a pair
variables. The scatter plot helps detect potential relationships between values, and
identify outliers in data sets.
• Additional information can be illustrated through the size and/or colour of the dots.
Pie chart
• It is best used to display proportional data, and/or percentages.
• Since the pie chart represents the size relationship between the parts and the entire
entity, the parts need to sum to a meaningful whole.
• It is best to avoid the pie chart when there are many values as it can easily become
cluttered and unreadable.
Gauge
• It is used to indicate the completion of a goal.
• The gauge is often used to present KPIs, for example, on an executive dashboard, and
together with segmenting and colour coding, it is an effective way of illustrating a
performance result.
Map
• It is used to display data as point and or areas on a map.
• It is used to display the geographical distribution of variables, such as sales by office,
store, city or country around the world.
Pivot table
• It is used to summarise and create a cross table view of data. It is particularly useful
when you want to include several dimensions or measures in a single table, and then
want to reorganize them to explore different subtotals.
• In a pivot table you can analyse data by multiple measures and in multiple dimensions
at the same time. You can rearrange the measures and dimensions to get different
views of the data.
Table
• It displays values in record form, so that each row of the table displays the fields
aligned as in the data source. Fields containing calculated values can also be added.
• Use them when you want to view detailed data and precise values rather than
visualizations of values.
Filter pane
• Essentially an index to make selections to reduce the dataset by controlling what data
is reflected in the visualizations on a sheet.
• Multiple filter panes can be combined, to easily make several selections and define
your data set exactly like you want it.
Treemap
• It is used to display a large amount of hierarchical data within a limited space.
• It is great at displaying aggregate data and allowing exploration through drilling down.
• Functions are used to manipulate data in apps. There are several hundreds available
®
functions in Qlik Sense that can be used for various purposes, such as to perform
calculations, interpret data, determine conditions etc.
• Functions always take their parameter(s) enclosed in parentheses ( ).
• An overview can be found:
https://help.qlik.com/en-
US/sense/3.1/Subsystems/Hub/Content/Scripting/functions-in-scripts-chart-
expressions.htm
• Some examples of functions:
• IF ( ) • AVG ( )
• COUNT ( ) • NUM ( )
• AGGR ( ) • RANK ( )
• DATE ( ) • RGB ( )
• SUM ( ) • CYAN ( )
• Additionally custom measures can also be created and are a major part of any Qlik
project.
• Master items are customised and reusable assets such as visualizations, dimensions
and measures that you can use throughout your app.
• You can use a master dimension in as many of your visualizations as you like and
maintain it in just one place. Any updates you make to the master item will be applied
everywhere the master item is used.
®
• Qlik Sense online help pages
Always remember there are online help pages that describe most of the features
available.
https://help.qlik.com/en-US/sense/3.1/Content/Home.htm
®
• Qlik Sense Community
Also if something is not documented in the formal documentation it will most
probably exist in the forums. This is where you will refer to most often when.
https://community.qlik.com/community/qlik-sense
• Tip! When searching google, check out results for Qlik View. Often the answer will
®
also be applicable in Qlik Sense .
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
The three dots toggle the grey area, either collapsing or expanding it.
“Show app information”
4
Data visualisation workshop - Qlik Sense January 2017
PwC 57
Hands on exercise
Visualising CORDIS Data
Context Instructions
• For our first hands on exercise we will • During the next slides any text written in
create a dashboard using data from the black indicates explanations.
European Commission’s Community
• Any text written in red indicates actions
Research and Development Information
you need to take for the exercise.
Service (CORDIS).
• CORDIS is a portal for information on
EU-funded research projects.
• For our exercise we will be exploring a
dataset containing information on
research contributions by the EU to
different countries, for different projects
under the HORIZON 2020 (H2020)
framework programme for research and
innovation from 2014 to 2020.
Adding a Map
It’s time for everyone’s favourite chart, the map!
Maps require special “Shape” data to define the locations. This data includes coordinates
that outline areas and pinpoint locations.
We have provided you with just that.
Open your “Data manager”
in a new tab.
Adding a Map
In the Data manager click on the little cross on the right, to add a data source.
Adding a Map
Navigate to and select the “WorldKMLData.qvd” file. Click next.
Adding a Map
From the selection menu de-select the “WorldCountries.FullName” and
“CountryISO_Numeric” as we won’t need them.
Then click “Load data and finish”.
Adding a Map
We are now in the associations menu. In this menu we can link different data sources
based common data fields.
Each bubble represents a different data source.
Adding a Map
Drag and drop the “WorldKMLData” bubble onto the “CORDIS” bubble to create an
association.
Adding a Map
On doing so, notice that Qlik Sense automatically detects that there are common values
between the country code fields of the two data sources.
The orange colour indicates a medium level of common values. This can also be green, for
a very good match, or red, for no match at all.
Adding a Map
Click on the association name and rename it to “Country” for simplicity.
Then click on “Load data”, at the top right corner to include the new data in your app.
Adding a Map
We will also add some country population data to use later on.
Navigate to and select the “WorldPopulations.xls” file. Click next.
Adding a Map
Drag the populations source on to the WorldKMLData source.
Create an association between the “CountryISO_3Char” and the “Country Code” fields
and rename it “Country ISO3”.
Then click on “Load data”, at the top right corner to include the new data in your app.
Adding a Map
Upon returning to your sheet, notice that the charts display errors now. This is because
now there is an error with a dimension, as we renamed a field name “country’ to
“Country”.
Simply update the field and your charts will pop back.
Adding a Map
Now let’s add the map to our datasheet.
Drag and drop the “Map” chart onto the top right corner of your sheet.
Adding a Map
Find the “Country” field in the “Fields” menu under “WorldKMLData” and drag and
drop it onto the map chart.
Adding a Map
Find the “WorldCountries.ShortName” field in the “Fields” menu under
“WorldKMLData” and drag and drop it onto the map chart. Select “Add as area layer”.
Adding a Map
Next we must add the contribution data to our map.
Drag and drop ecContribution onto the map and select “Color by” -> “By measure” ->
“Sum(ecContribution)”
Adding a Map
The result should look somewhat like this.
Adding a Map
Now when navigating to the “Done” view and selecting the UK on the map, we see that the
amount is “0”. Obviously this should not occur. When checking other countries we note
that it is the same for Greece and is due to the use of a different country code between the
EC, used in CORDIS, and the international ISO-2 specification, used in the
WorldKMLData file.
Adding a Map
This is a great opportunity to demonstrate one of the most versatile features of Qlick
Sense, the “Data load editor” and do some scripting.
Click on the “Navigation” button and open the “Data load editor” in a new tab.
Adding a Map
Head to the “Auto-generated section” and click “Unlock” and again “Unlock”.
Here we have automatically generated parameters indicating how to interpret the data
contained in our data sources. Notice the purple text indicating our two sources.
Adding a Map
®
We need to modify the way Qlik Sense loads the data of our “CountryISO_2Char” field,
to conform with the code used by the EC.
Modify the line as shown below and click “Load data”.
Adding a Map
®
We need to modify the way Qlik Sense loads the data of our “CountryISO_2Char” field,
to conform with the code used by the EC.
Modify the line as shown below and click “Load data”.
CODE:
if([CountryISO_2Char]='GR','EL',if([CountryISO_2Char]=
'GB','UK',[CountryISO_2Char])) AS [Country]
Adding a Map
Going back to your sheet, the UK and Greece should now both display a value.
Adding a Map
Now that we have our data working, let’s finalise the appearance of our map.
Add a title, remove the legend and position it at the right in a square shape.
Adding a Gauge
Now we will add a gauge to sum up our selections and display the part of total we have
gathered. Drag and drop the gauge chart onto your sheet.
Adding a Gauge
Add the measure “ecContribution” to your gauge.
Adding a Gauge
Now let’s refine our gauge according to our purpose.
From the Measures menu, under data, format the values to appear in “€” and without
decimals.
Adding a Gauge
Now let’s refine our gauge
according to our purpose.
From the Appearance menu,
under presentation, add a
range limit of
Max=15519180429 as that is
the total amount of
contributions.
Adding a Logo
Now let’s add a finishing touch to our sheet.
Drag and drop a “Text & image” chart onto your sheet.
Adding a Logo
Copy and paste into this folder a file of your choice from the collection of European
Commission logos.
Adding a Logo
Click on the cross and from the menu that appears click on the image icon at the right.
Adding a Logo
Find the logo you added in the default folder and click “Insert”.
Adding a Logo
Finally, now that we have our new data including country names we can make them
appear in our pivot table as well, making it more readable. Select it and change the field
to “WorldCountries.ShortName” and de-select “Show null values”.
Remember! Each name is still connected with the correct contribution value through the
common “Country” field.
Shifting perspective
However! There is a slight issue with this sheet. As we by now all agree, visualisations can
be misleading. In this case and particularly due to the map and bar chart, one could come
to the conclusion that certain countries are granted an uneven amount of funds. But is
this really the case..?
Shifting perspective
By selecting just the 4 top countries we are already get over 50% of the total
contributions.
Shifting perspective
This is a very good example of “shifting the perspective” and changing the lens through
which we view a matter.
Be aware that the viewer may not always have all information necessary to fully
understand the context. Still as an analyst of the data it is important to gather the correct
insights into the data.
So to illustrate the importance of different perspectives on the same data, let us add the
population per country into the mix and view the same information per capita!
Shifting perspective
Open your sheets menu, right-click on your first sheet and select “Duplicate”.
Rename the duplicate sheet to “CORDIS per Capita” and open it.
Shifting perspective
Select the Barchart and modify the fields of its “Data” menu accordingly.
Also change the barchart’s and the gauge’s colour to green to differentiate from the other
sheet.
Shifting perspective
Select the Map and modify the colouring option accordingly.
Shifting perspective
Now click on “Done” and witness a quite different, and indeed more equal
distribution of funds than previously!
Qlik Sense’s Stories feature offers a simple and easy way for showcasing one’s insights to
others. Stories allows you to create slides that combine conventional presentation features
with content captured in a handy way from your Qlik Sense sheets.
The stories created can be shared through the cloud or saved in PDF form to print.
®
Data storytelling in Qlik Sense follows the simple methodology below:
1. Collecting insights
2. Selecting useful insights
3. Building a story
4. Emphasise important information
5. Present the finished story
To access your apps and stories on mobile you simply need to navigate to your Qlik Cloud
®
or server on which you’re hosting your Qlik Sense implementation through your mobile
device. Once there you can explore everything like normal as it automatically adapts to
your screen.
Context
®
In this section we will let you work independently on some exercises in Qlik Sense .
You will find all the exercises in the app and other accompanying files provided by us.
These exercises will contain new functionalities not covered in the CORDIS exercise to
®
further understand the possibilities of Qlik Sense .
The data set provided is a fictional sales dataset.
Here is an overview of what we will cover during these exercises:
• Custom measures
• Drill-down dimensions
• Rank functions
• Set Analysis
• etc.
Creating Variables
Variables are objects whose values are not fixed, but are calculated according to
current conditions when called within an expression.
In this example the variable calculates the maximum value of the MonthNum
field and then subtracts 1. This is a common trick used to calculate previous
years to a current selection.
Calculation Condition
In the “Add-ons” menu of some visualisations you can add a “Calculation condition” for
when the chart should appear or not.
This comes in handy when it doesn’t make sense for a chart to be drawn unless some
conditions apply.
Reference Line
In the “Add-ons” menu of some visualisations you can add a “Reference line” to compare
against.
This is useful when you have a benchmark value you want to check against. The reference
line is calculated with an expression.
IF Statements
If statements are used when we need to calculate the value of a measure while taking into
account multiple possibilities for our criteria.
An IF statement always follows the IF(condition, then, else) syntax.
In this example an if statement is used to colour a field based on its possible values.
The 1 operator indicates to calculate the set based on the whole dataset and irrespective of
selection.
®
Remember! Everything is case sensitive in Qlik Sense expressions, this includes field,
dimension, measure and variable names, and field values.
Quotes in expressions
The single quotes ‘ ’ indicate a value. They are use for example to indicate the values in a
comparison expression e.g. CustomerName=‘John’
The double quotes “ ” operator indicates to calculate a value according to some criteria,
such as by using wildcards.
This presentation has been carefully compiled by PwC, but no representation is made or warranty given
(either express or implied) as to the completeness or accuracy of the information it contains. PwC is
not liable for the information in this presentation or any decision or consequence based on the use of it.
PwC will not be liable for any damages arising from the use of the information contained in this
presentation. The information contained in this presentation is of a general nature and is solely for
guidance on matters of general interest. This presentation is not a substitute for professional advice on
any particular matter. No reader should act on the basis of any matter contained in this publication
without considering appropriate professional advice.
The contents of all datasets used in this workshop are fictional, if not stated otherwise. Any
resemblance to actual persons, places, organisations or products is purely coincidental.