Book Image

Qlik Sense Cookbook. - Second Edition

By : Pablo Labbe, Philip Hand, Neeraj Kharpate
Book Image

Qlik Sense Cookbook. - Second Edition

By: Pablo Labbe, Philip Hand, Neeraj Kharpate

Overview of this book

Qlik Sense allows you to explore simple and complex data to reveal hidden insight and data relationships that help you make quality decisions for overall productivity. An expert Qlik Sense user can use its features for business intelligence in an enterprise environment effectively. Qlik Sense Cookbook is an excellent guide for all aspiring Qlik Sense developers and will empower you to create featured desktop applications to obtain daily insights at work. This book takes you through the basics and advanced functions of Qlik Sense February 2018 release. You’ll start with a quick refresher on obtaining data from data files and databases, and move on to some more refined features including visualization, and scripting, as well as managing apps and user interfaces. You will then understand how to work with advanced functions like set analysis and set expressions. As you make your way through this book, you will uncover newly added features in Qlik Sense such as new visualizations, label expressions and colors for dimension and measures. By the end of this book, you will have explored various visualization extensions to create your own interactive dashboard with the required tips and tricks. This will help you overcome challenging situations while developing your applications in Qlik Sense.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Using a master library in Edit mode


As mentioned in the Creating a master library from the Data model viewer recipe, a great benefit of creating a master library is to save you time and reduce the complexity by applying global changes to your visualizations.

There are three main areas in the asset panel when editing a Qlik Sense sheet (Charts, Custom objects, Master items, and Fields). Clicking the chain button (

) opens the Master items pane.

From here, you can manage every aspect of the Master items, such as renaming, replacing, deleting, and editing.

Getting ready

You can continue to use the application from the Creating a Master Library from the Data model viewer recipe:

  1. If you have not completed the Creating a Master Library from the Data model viewer recipe, load the following in your Data load editor:
LOAD * INLINE [ 
Country, Area, Quantity 
USA, North, 1000 
USA, North, 1200 
USA, South, 2500 
USA, South, 2500 
UK, North, 1000 
UK, North, 2500 
UK, South, 2000 
UK, South, 1900
 ]; 
  1. Add Country and Area as Master dimensions, both with the Geo tag.
  2. Add Quantity as a Master measure.

How to do it…

  1. Open the App overview screen by clicking on the navigation dropdown on the toolbar at the top.
  2. Create a new sheet or open an existing one.
  1. Enter the edit mode by clicking on the
     button.
  2. Click on the object pane button (
    ) and double-click on the
     button. The chart will be added to the main content area automatically.
  3. Type Geo in the search box of the asset panel on the left of your screen. While there are no charts called Geo, the search has flagged up our two tagged dimensions in the master library pane with a yellow circle.
  4. Drag the Area field to where it says Add dimension. Repeat the steps where the Country field selects Add "Country" when prompted, as shown in the following screenshot:
  1. Clear your search on Geo by pressing the
     button.
  2. Click on Measures.
  1. Drag the Sales measure from the asset panel over to the add measure area of the chart. Voila! You have created your first visualization using Master dimensions and measures:
  1. You can now drag this chart into the asset panel and it will become a master visualization.

There's more…

If you delete a Master dimension or Master measure, the visualizations that use the deleted Master item will not work unless you replace it with a new dimension or measure. The same applies to delete a field from the data model; the reference will remain part of the Master item pane until it's updated from the edit screen.

Creating master measures replaces the need to write expressions as variables for reuse. Another piece of QlikView functionality that has been replicated and expanded upon is the concept of linked objects. Any updates you make in the Master visualization area will be applied globally.

If you rename a field in your script without moving the position, it will be applied automatically to all the objects.