Book Image

Hands-On Business Intelligence with Qlik Sense

By : Pablo Labbe, Clever Anjos, Kaushik Solanki, Jerry DiMaso
Book Image

Hands-On Business Intelligence with Qlik Sense

By: Pablo Labbe, Clever Anjos, Kaushik Solanki, Jerry DiMaso

Overview of this book

Qlik Sense allows you to explore simple-to-complex data to reveal hidden insights and data relationships to make business-driven decisions. Hands-On Business Intelligence with Qlik Sense begins by helping you get to grips with underlying Qlik concepts and gives you an overview of all Qlik Sense’s features. You will learn advanced modeling techniques and learn how to analyze the data loaded using a variety of visualization objects. You’ll also be trained on how to share apps through Qlik Sense Enterprise and Qlik Sense Cloud and how to perform aggregation with AGGR. As you progress through the chapters, you’ll explore the stories feature to create data-driven presentations and update an existing story. This book will guide you through the GeoAnalytics feature with the geo-mapping object and GeoAnalytics connector. Furthermore, you’ll learn about the self-service analytics features and perform data forecasting using advanced analytics. Lastly, you’ll deploy Qlik Sense apps for mobile and tablet. By the end of this book, you will be well-equipped to run successful business intelligence applications using Qlik Sense's functionality, data modeling techniques, and visualization best practices.
Table of Contents (18 chapters)
Free Chapter
1
Section 1: Qlik Sense and Business Intelligence
3
Section 2: Data Loading and Modeling
6
Section 3: Building an Analytical Application
11
Section 4: Additional Features

An overview of the Qlik Sense product

This chapter will provide an overview of several of the major facets of the Qlik Sense software and what you need to understand to get started with Qlik Sense. We will not be covering the administration components or delving too deep into the advanced extensibility capabilities, but, by the end of this chapter, you will understand what Qlik Sense is and how you can use it.

The components of Qlik Sense

In the following sections, we will cover four major components of the Qlik Sense software:

  • In-memory associative database
  • The Extract-Transform-Load (ETL) engine:
    • Data manager
    • Script
    • Data model
  • The visualization platform:
    • The hub
    • Applications
    • Sheets
    • Objects
  • API and extensibility capabilities

In-memory associative database

Qlik's in-memory associative database is the proprietary technology that Qlik invented in 1993 in Lund, Sweden, which allows large amounts of data to be compressed, stored in the RAM, and rapidly traversed in the Qlik Sense client. In other words, this is what makes Qlik, Qlik.

This database houses all of the data we need inside the Qlik Engine and allows us to explore the datasets in a way that facilitates analytics in a much better manner. We'll get into how and why this approach is better in the next section, The Associative Engine.

ETL engine

Qlik Sense includes a built-in ETL engine that allows us to connect to many different sources, such as Excel, SQL, and Hadoop, to extract data into Qlik Sense. We can also use this ETL engine to transform the data, to manipulate the data, to clean up dirty data, or to create new data.

This is a very powerful component of the Qlik platform because we don't have to leave Qlik to do mappings, create buckets, or fix bad data; we can do everything we need right inside Qlik Sense, and there is even an intuitive user interface that guides users with no programming knowledge required.

Data manager

The Qlik Sense Data manager provides a way to pull data into Qlik Sense through an intuitive user interface. It contains a way to connect to your data sources, select the data you are looking to analyze, pull the data in, and link it to other data you have pulled in. Using Qlik's Cognitive Engine, and AI created by Qlik, the Qlik Sense Data manager automatically profiles your data and recommends how to connect different tables based on similar data keys. We'll go further into this profiling capability and how to transform data in the Self-service with Qlik Sense section at the end of this chapter.

Script

For more advanced users, the Qlik Sense script provides the capability to programmatically extract and transform data from data sources. It uses a scripting language similar to SQL and allows more granular control over how the data is extracted and transformed. Most users will use the Data manager, but it is important to note that this capability exists for users who need to transform data in more complex ways:

The preceding screenshot is of the Qlik Sense script setting a variable with the Today() function and loading a table from a QVD, which is a proprietary Qlik data file that is optimized for use in Qlik. Most users will not leverage QVDs directly, but there are many advanced use cases where they can and should be leveraged.

Data model

The Qlik Sense Data model viewer allows us to see all of the data we have pulled into Qlik Sense. This is similar to the Data manager view, but is intended more for understanding the relationships between the data than adding or transforming data. This view provides information on linkages between tables, including metadata about the tables and fields in our data model, and a preview of the data. This view is very useful for understanding the state of the data we've pulled into Qlik Sense and ensuring that everything is linked together in the way we want it to be linked:

The preceding screenshot shows a sample Qlik Sense data model. The SalesDetails2 table is selected, as can be seen by the dark orange highlight (dark gray), and tables that are directly linked to the SalesDetails2 table are highlighted in light orange (light gray).

Visualization platform

The Qlik Sense client is what we, as users, interact with directly; this is the component that allows us to import and transform data, build charts, and perform analytics. Once data is loaded into the Qlik Sense application, we can use the Qlik Sense client to create visualizations on top of that data, such as line charts, bar charts, tables, and maps. Creating these visualizations is as simple as dragging a chart type onto the canvas and dropping in measures and dimensions. If you're looking to kickstart your vizzing, Qlik's Insight Engine creates visualizations for you at the click of a button. We will go through how to do that in the Self-service with Qlik Sense section.

Here are the components of the Qlik Sense client:

  • The hub
  • Application overview
  • Sheets
  • Objects

The hub

Here is a view of the hub, which houses applications. Note that the hub may look slightly different depending on whether you are using Qlik Sense Desktop, Qlik Sense Cloud, or Qlik Sense Enterprise. The hub is where you can search through and access all of your applications, create new applications, and find information about your Qlik Sense version:

Application overview

A Qlik Sense application contains several components, most notably a single data model (see the Data model section for more information) and a collection of one or more sheets. Think of an application as a container for data and visualizations; it holds both the data and the visualizations to which we attach the data:

The preceding screenshot shows the application overview, which is the screen that shows us what the application contains, that is, Sheets, Bookmarks, and Stories. This view also allows us to edit the settings of the application, such as the name, description, or thumbnail image, as well as create new sheets and stories. Bookmarks and stories will be covered in a later chapter.

Sheets

Just as an application is a collection of sheets, a sheet is a collection of objects that can be customized and manipulated to facilitate analyzing the data. Each sheet may, and probably will, look different given that Qlik Sense provides a blank canvas on which to place objects:

The preceding screenshot is a sheet contained in the Qlik Sense Sales Discovery demo application. This sheet has filter boxes down the left side, some Key Performance Indicator (KPI) objects oriented vertically in the center, a combo chart featuring three different sales metrics broken out by the Region field, and a line chart of Sales by day at the bottom.

Objects

Qlik Sense comes with a variety of different objects that can be used to visualize and analyze data. These objects range from filter boxes and simple bar charts to maps and scatter plots. Additionally, Qlik now ships with several extension objects that provide more complex visualizations and functionalities, such as Sankey and Radar charts, or buttons, and variable inputs. Objects allow us to create beautiful and insightful visualizations quickly and easily on the Qlik Sense canvas:

The preceding screenshot highlights a combo chart, which is a type of object that can accept multiple dimensions and measures as input. In this example, the dimension used is Region and the measures used are Sales YTD, which is represented by the blue bar, Sales LY YTD, which is represented by the yellow line, and Sales Goal, which is represented by the red line. This type of visualization allows us to compare multiple sales metrics across our six regions and see how close each one is to the prior year and goal.

Many other visualizations are available with the Qlik Sense client, and many more are available as extension objects. Check https://branch.qlik.com for hundreds of interesting extension objects that are created by others in the Qlik community.

Please note that not all extension objects are tested or supported, as many are open source. Qlik has created a certification program wherein they have certified several extension objects, but most remain uncertified, so use them at your own risk.

API and extensibility capabilities

We won't go too deep into the extensibility of the Qlik Sense platform here, but it's important to note that the capabilities of Qlik Sense far exceed what is available out of the box. Qlik comes with a comprehensive set of APIs that developers can use to create fully-customized web experiences using the ultra-fast in-memory Qlik Data model. These APIs significantly broaden what Qlik Sense can do from the perspectives of guided, operational, and predictive analytics:

The preceding screenshot is an example of a customized mashup, created by Qlik, and illustrates the capability to extend Qlik Sense and create more guided applications with the look and feel of a website rather than a BI tool.

The Associative Engine

Qlik's Associative Engine is a remarkably fast and flexible in-memory database that enables users to leave the old world of query-based data pulls and enter the future of true data exploration through what Qlik terms the Associative DifferenceTM. The power of the Associative Engine rests in the ability to start with the entire set of data and navigate the data not just linearly, which you may be used to in other tools, but also laterally, without having to define a path before you start your analysis. This mechanism facilitates analytics in the same way that our brains actually work; analytics is a creative process that evolves rapidly as we're performing the analysis. If you knew what answer you were looking for before you started, you wouldn't need a tool; you could just find that answer with a single query.

Consider how you find information about a restaurant: you go to your favorite search engine and type in the name of the restaurant. From there, you may explore some review sites, find the restaurant's website, take a look at the menu, and maybe you stumble on some related restaurants. One of the related restaurants catches your eye and you see they have availability through a reservation service. You then book that restaurant and go on to enjoy a fabulous meal. This is a simple use case, but it clearly illustrates how any analysis, no matter how small, is a journey and you don't necessarily know where the destination is when you start.

Qlik facilitates this creative analytics discovery process through a clever color scheme that highlights filter values throughout the application:

In the preceding screenshot, the selected field values are highlighted in green (dark gray); that is, Western in the Region filter box and Amalia Craig and Amanda Honda in the Sales Rep filter box.

The values highlighted in white are associated with or related to the selected values, that is, ActionWorld, CAPCON, and so on, in the Customer filter box.

The values highlighted in light gray are called alternative values. In other words, if I hadn't made any selections in the Region field, the remaining regions would be in white. The values highlighted in dark gray are called excluded values, which means that they are not associated with or related to selections made in other fields; in this case, the Region and Sales Rep fields.

The following screenshot illustrates this concept a little more clearly:

By selecting a few customers, I can see that Janice Scott and Samantha Allen are related to ActionWorld, GDSS, and Neostar, but are highlighted in light gray because I have made other selections in the Sales Rep field.

Conceptually, this may seem simple, but it allows us to see the whole universe of data all at once and helps our brains do what brains do best: identify patterns and irregularities. Let's say, for example, using the preceding filters, that Brad Taylor is also supposed to be covering ActionWorld. It sticks out immediately that Brad is not in the list of alternate Sales Reps. We recognize that irregularity and pivot our analysis on the fly, clicking Brad's name and digging around for why he's not selling anything to ActionWorld. In an alternative tool that doesn't have this capability, we miss this opportunity to discover, because we're only shown exactly what we've asked for:

In addition to facilitating the creative analytics process through data highlighting, Qlik Sense also enables us to rapidly traverse data in a Wonkavator-like fashion; that is, navigating the data in every possible direction. The breadcrumb trail at the top of each application shows every selection we've made and allows us to change those selections in any order we want, not just navigating backward and forward. We can go down the path of Region | Sales Rep | Customer, but we're not bound to that path; for example, we can change the Sales Rep and leave the other selections intact, or clear Region and see how that affects the Customer and Sales Rep fields. We can also lock fields, select all values, select alternative values, or select excluded values, all right from the breadcrumb bar, which is always located at the top of the screen, as seen in the following screenshots:

The flexibility of Qlik's Associative Engine complements the naturally creative process of analytics and gets us to better decisions faster. So, let's get into Qlik Sense!

Setting up Qlik Sense Desktop

Qlik Sense Desktop requires a Windows 7 or later PC with at least 4 GB of RAM (keep in mind that Qlik Sense uses RAM to store data, so larger datasets will require more RAM). For non-Windows computers, your best option is Qlik Sense Cloud, which we will cover in the next section.

To download Qlik Sense Desktop (note that instructions may vary slightly depending on region), perform the following steps:

  1. Navigate to the Qlik website: https://www.qlik.com
  2. Click the Try or Buy button at the top right
  3. Click Try It Free underneath Qlik Sense Desktop
  4. Fill in your contact information or log in with your Qlik Account if you have one
You will need to use these credentials to log into the Qlik Sense Desktop client later, so make sure you remember your username and password.

Alternatively, you can go to directly to https://www.qlik.com/us/try-or-buy/download-qlik-sense and then follow step 4. Once you submit the form, it should automatically start the Qlik Sense Desktop download.

To install the software, follow these instructions from the Qlik Help site https://help.qlik.com:

  1. Double-click on Qlik_Sense_Desktop_setup.exe to start the installation. The welcome dialog is displayed.
  2. Click Custom Installation. The License agreement dialog is displayed.
  3. Read the License agreement, select the I accept the license agreement checkbox, and click Next.
  4. Type or browse to the location where you want to install Qlik Sense Desktop and click Next.
  1. Qlik Sense Desktop cannot be installed in locations where administrator rights are required, for example C:\Program Files.
  2. Type or browse to the location where you want Qlik Sense Desktop to store app content, and click Next.
  3. On the ready to install screen, select to create a desktop shortcut. Click Install.
  4. In the extension bundles section of the Ready to install screen, select to create a desktop shortcut. Select which extension bundles you want to install from the list of those available for your Qlik Sense installation.
  5. If you have chosen not to install the extension bundles, click Install. Otherwise, click Next.
  6. If you are installing any of the extension bundles, accept the extension bundle license agreement. Then click Install.
  7. When the installation has completed, the installation summary is displayed.
  8. Click Finish to close the installation summary.

You can now open up Qlik Sense Desktop; you will have to log in with the credentials you used to create an account.

Once you open Qlik Sense Desktop, you can also navigate to it from a browser, such as Google Chrome, at the http://localhost:4848/hub web address. You must keep Qlik Sense Desktop open while using Qlik Sense from your browser.

You can always access the Qlik Help directly from this screen by clicking the Getting started... button at the bottom, or going to help.qlik.com.

From this main screen, or the Qlik Sense Desktop hub, you can click on any of the thumbnails and explore a ready-made Qlik Sense application, courtesy of Qlik, to help jumpstart your orientation into Qlik Sense. We'll go into some more detail on using Qlik Sense in the Self-service with Qlik Sense section:

For the Self-service with Qlik Sense section, we'll be leveraging the Sales Discovery application, so if you'd like to follow along on your screen, click that thumbnail and you'll be taken into the sheet menu, then click on the first sheet. If you followed this section and don't wish to set up a Qlik Sense Cloud account, you can skip the next section.

Setting up Qlik Sense Cloud

For a more collaborative experience with Qlik Sense, or if you don't have a Windows PC on which you can install software, the Qlik Sense Cloud is a great option (and it usually gets the latest-and-greatest Qlik updates before they are available for download).

To create a Qlik Sense Cloud account (note that instructions may vary slightly depending on region and availability), perform the following steps:

  1. Navigate to the Qlik Cloud website: https://www.qlikcloud.com/
  2. Click the Register button at the top right
  3. Click Get A Free Account underneath Qlik Sense Cloud
  4. Fill in your contact information or log in with your Qlik Account if you have one
You will need to use these credentials to log into the Qlik Sense Cloud later, so make sure you remember your username and password.

If you've used Qlik Sense Desktop, the first thing you'll notice when you log into the Qlik Sense Cloud is that it looks a little bit different; there are additional menus down the left side, there are buttons to Create a New app and Import data, and it may have even pulled in a profile picture. These differences represent the collaborative nature of Qlik Sense Cloud: you can share applications and datasets that you create with others on the Qlik Sense Cloud platform. To follow along, navigate to the Qlik Cloud resources button at the left side menu, right-click on the Sales Discovery application, and click Duplicate. Now navigate to My work in the left-side menu and open the Sales Discovery application that you just created:

Right-click on the Sales Discovery application and click Duplicate:

This is now what your My work should look like after duplicating the Sales Discovery application from the Qlik Cloud resources section.

The Qlik Sense Cloud is free to use for up to five users, while larger plans can be purchased for up to 50 users. There are some excellent video resources available in the Qlik Cloud resources section of the Qlik Cloud, as well as on YouTube.

Self-service with Qlik Sense

Finally, we are all set up with Qlik Sense and we're ready to jump into some analysis. This section will help you understand what self-service is in Qlik Sense and why you would want to use it. Later chapters will go deeper into how to pull in your own data and create visualizations. We will be using the Sales Discovery application available on the Qlik Sense Cloud or Qlik Sense Desktop, if you would like to follow along.

Qlik Sense self-service enables users to load their own datasets, create measures and dimensions, create visualizations, and create stories without another person or group, typically IT, having to intervene. This model has become exceedingly popular over the past few years, often to the chagrin of IT professionals who are looking to protect and lock down their infrastructures; it's a difficult challenge, especially in this age of constant cyber attacks and phishing scams, to allow users access to their data freely. Fortunately for business users and IT alike, Qlik Sense makes it much easier to employ governance practices and provide users with the access they need to make data-driven decisions.

We'll start with the data model piece, and remember we'll go much further into detail in the subsequent chapters on how to create your own data model. In the following screenshot, you can see that Qlik Sense has linked these various data sources together. There is a + button in the top-left corner that allows users to add more data to the data model. At the bottom (if you select a bubble), there is a mechanism to edit the table prior to loading it and perform various types of transformations:

The data transformation interface in Qlik Sense is excellent for making basic changes to the data, such as mapping, bucketing, adjusting null values, and creating new calculated fields from data that already exists; for example, Price * Quantity to make a Sales field. Qlik Sense is also smart enough to recognize what the field types are and can make intelligent suggestions on how you may want to transform the data. In the following screenshot, you can see that Qlik Sense has identified the selected field as a numerical field, and is suggesting a bucketing function to create a meaningful dimension by which to perform some analysis. This view also provides analytics and metadata about the tables and fields you're exploring, and is a very useful tool for analyzing data integrity prior to creating visualizations:

Once the data has been loaded, it populates the application with fields, which you can then use to create Master items, including measures, dimensions, and visualizations. For many users, these Master items will already be pre-populated by the developer who created the application, which allows for easier and faster creation of visualizations, since the user doesn't have to come up with the calculations. A later chapter will detail how to create expressions and calculations of your own in Qlik Sense.

This Master library helps maintain repeatability and governance of the application, but keep in mind that changing an item in the Master library changes it globally in the application.

It is now very easy to begin modifying and creating dashboards with the drag-and-drop functionality that Qlik Sense provides:

Creating new sheets is a breeze: to start from an existing sheet, just right-click and duplicate, or click the Create new sheet button to start from a fresh, blank sheet:

It's even easier with the Qlik Sense Insight Advisor: to create charts, you just need to drag some measures and dimensions onto the canvas and Qlik Sense will automatically identify the field types and create meaningful visualizations for you:

Or, there's always the EASY BUTTONTM; just click on the Insights button in the top-right corner (outside of Edit mode) and click Generate insights for charts to automatically be generated. With NLP, you can type in fields that you care more about to get more specific results as well:

Self-service is extremely easy with Qlik Sense, and it's getting better with each release; however, it is important that we all make sure to create and share data ethically and safely. Self-service can easily get out of hand and open up risk for both IT and the business, so it is everyone's responsibility to remain educated on the tools and governance best practices available. Combining the right education program with appropriate governance practices, a concept known as Governance Through Education, will ensure that everyone operates in a safe and healthy environment for self-service.