Book Image

QlikView for Developers

By : Miguel Angel Garcia, Barry Harmsen
Book Image

QlikView for Developers

By: Miguel Angel Garcia, Barry Harmsen

Overview of this book

QlikView is one of the most flexible and powerful Business Intelligence platforms around. If you want to build data into your organization, build it around QlikView. Don't get caught in the gap between data and knowledge – find out how QlikView can help you unlock insights and data potential with ease. Whether you're new to QlikView or want to get up to speed with the features and functionality of QlikView, this book starts at a basic level and delves more deeply to demonstrate how to make QlikView work for you, and make it meet the needs of your organization. Using a real-world use-case to highlight the extensive impact of effective business analytics, this book might well be your silver bullet for success. A superb hands-on guide to get you started by exploring the fundamentals of QlikView before learning how to successfully implement it, technically and strategically. You'll learn valuable tips, tricks, and insightful information on loading different types of data into QlikView, and how to model it effectively. You will also learn how to write useful scripts for QlikView to handle potentially complex data transformations in a way that is simple and elegant. From ensuring consistency and clarity in your data models, to techniques for managing expressions using variables, this book makes sure that your QlikView projects are organized in a way that's most productive for you and key stakeholders.
Table of Contents (24 chapters)
QlikView for Developers
Credits
About the Authors
Acknowledgements
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Preface

The need for business intelligence (BI) solutions and data analysis has always existed, and so have different approaches to fulfill this need. Traditional BI software has heavily relied on techniques that have been around and persisted through the decades, but newer technologies have emerged in recent times that have been proven to be more flexible and, therefore, more adequate for the evolving environment in which they are used. QlikView is an example of these disruptive technologies, a kind of software that changes the rules of the game.

QlikView is different; that's a fact. It's different in an advantageous way. If you have worked with traditional BI software before, it might be necessary to let go of some of the preconceptions you may have regarding how BI solutions are built. If, on the other hand, you are a newcomer to the BI landscape, we will help you get the basics in order so that you get up-to-speed. In any case, rest assured that you are on the right track by having picked QlikView as your tool and this book as your guide.

The good news is, the material between these covers has been written in such a way that newcomers, BI professionals experienced in other tools, and even seasoned QlikView practitioners will find useful. This book will provide you with the knowledge required to understand how QlikView works, and the skills needed to build QlikView documents from start to finish—from loading data to building charts. Even if you have worked with QlikView before, you will find that the exercises presented in each chapter, and the recommended practices we discuss, will help you extend your knowledge and become more proficient with QlikView.

Among other features you will find on this book, some of the most important are as follows:

  • The book is practical and hands-on. It is filled with examples that will let you take the theory into practice right away. We support this hands-on experience by providing a full dataset used across the entire book, and around which we build a fully-functional QlikView document that contains a dashboard, various analyses (both basic and complex to build), and reports using the Dashboard-Analysis-Reports (DAR) approach.

  • In every chapter, a piece of a final QlikView document is built, which allows you to follow its evolution from start to finish. It also enables us to cover different development challenges that you may encounter in a real-world QlikView project.

  • We made sure to cover both backend and frontend development, so you will find that all 15 chapters cover different topics, from scripting and data extraction to data modeling, design, charts and expressions, as well as security, and everything in between. We also talk about various best practices related to each of these topics.

All of the examples discussed in the book are complemented with solution files for the reader to follow the exercises and compare your work. The QlikView files we provide are Personal Edition enabled, which means that a purchased QlikView license is not required to open them.

Although the case and story used in the book are built around a fictional company, the data we use in our examples and final application is real. Thanks to the Open Government initiative and the Bureau of Transportation Statistics of the United States, which compiles and maintains a complete dataset about airline operations in the US, you will be able to work with real data and build a QlikView application to analyze flights, enplaned passengers, cargo, and many others across multiple dimensions, such as carriers, airports, cities, and aircraft types.

Congratulations on taking a step towards learning to develop BI applications with QlikView. Are you ready for take off? Qlik on!

What this book covers

Chapter 1, Meet QlikView, introduces QlikView and shows how it can be used to explore data. We will also learn about the technology and components behind QlikView and will be introduced to the case that is used throughout the book: HighCloud Airlines.

Chapter 2, What's New in QlikView 12, presents a summary of the changes in the QlikView software, as well as in the Qlik ecosystem in general, that happened since the previous version of this book was published in 2012. In this chapter, we will bring you up to speed with the changes over the past few years.

Chapter 3, Seeing Is Believing, help us get hands-on with QlikView by building a simple QlikView document. We will learn what dimensions and expressions are, in the context of a QlikView document. We will also learn how to build simple charts to visualize and aggregate data, and how to design a basic user interface for navigating through the QlikView document.

Chapter 4, Data Sources, will help us learn how to load data from different sources and how to extract data using the built-in wizards. We will also take a closer look at QlikView's proprietary data files.

Chapter 5, Data Modeling, explains which type of data model is best suited for QlikView. We will see which rules need to be followed when designing a QlikView data model, and will also learn how best to take advantage of the associative data model to make our documents highly dynamic.

Chapter 6, Styling Up, will help us learn how to style our QlikView documents. We will learn about the various document and sheet properties and will use them to manage the visual style of our document. We will also take a closer look at some of the most fundamental objects and learn how we can change their appearance.

Chapter 7, Building Dashboards, introduces us to the three basic types of QlikView users, and how we can best cater to their needs. We will learn about the various charting options that are available in QlikView, and will see how we can add interactivity to our QlikView documents. We will also be introduced to basic calculations.

Chapter 8, Scripting, introduces us to the QlikView scripting language and editor. We will learn about the most important script statements, and how we can use them to manipulate data and control the flow of the script. We will also be introduced to some of the most important operators and functions for dealing with various data types. Finally, we will look at the options for debugging scripts, how to organize and standardize script, and how we can reuse our scripts.

Chapter 9, Data Modeling Best Practices, expands on the knowledge about data modeling and scripting we gained in earlier chapters. We will learn how to make sure that data models are consistent and how to work with complex data models and multiple fact tables. We will also learn how to reduce storage requirements for a dataset and how best to deal with date and time information.

Chapter 10, Basic Data Transformation, focuses on how to deal with unstructured data and how to transform it for use in our QlikView data model. We will learn about basic data transformation subjects, such as cleansing data and how to restructure pivoted and hierarchical tables for inclusion in the QlikView data model.

Chapter 11, Advanced Expressions, discusses the use of variables. We will also learn how to use conditional functions and how to handle advanced aggregations.

Chapter 12, Set Analysis and Point In Time Reporting, takes a closer look at Set Analysis and will explain how it can be used for Point In Time Reporting. We will also learn about comparative analysis using alternate states.

Chapter 13, Advanced Data Transformation, returns to the topic of data transformation. We will learn about the most commonly used data architectures that can ease QlikView development and administration. Next, we will take a close look at aggregating and sorting data in the data model. In the final part of the chapter, we will learn how to take advantage of some of QlikView's most powerful data transformation capabilities.

Chapter 14, More on Visual Design and User Experience, takes another look at the visual design of our QlikView documents, and will learn how to create a consistent user interface. The second part of the chapter introduces us to some additional manners of adding interactivity to our documents.

Chapter 15, Security, shows how to secure our QlikView documents. We will see how we can allow only authorized users to open our documents and will learn how we can limit what a user can do and see within our document.

What you need for this book

To use this book, you primarily need the QlikView Desktop software. With regards to computer requirements, you will need a PC with at least Windows XP (or better), 2 GB of hard disk space, and 2 GB of RAM. A 64-bit machine is required if you want to use QlikView 12 or a higher version, and is the recommended environment for this book and QlikView development in general. If you prefer to use a 32-bit machine, you can install QlikView 11 instead.

For best understanding, a general knowledge of BI and its terminology is required. Basic understanding of databases and SQL is preferred, but not compulsory for this book.

Who this book is for

This book is aimed at developers and power users who want to learn how to develop BI applications with QlikView. Developers who have already been using QlikView for some time may find that this book contains useful tips and best practices to make more effective use of QlikView.

This book only covers QlikView Desktop; deployments to QlikView Server and Publisher are beyond the scope of this book. The book is not aimed at QlikView Server administrators.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Before continuing, make sure a database file named Dimension Tables.mdb is in the Data Files\MDBs folder."

A block of code is set as follows:

LOAD `%Origin Airport ID`,
  `Origin Airport`;
SQL SELECT `%Origin Airport ID`,
  `Origin Airport`
FROM `Origin Airports`;

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "The example we will be using is the Movies Database, which is an example document that is supplied with QlikView."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

You can access http://www.qlikviewfordevelopers.com/codebundle/ to register and download the zip package with the data and example files used throughout this book. The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/QlikView-for-Developers. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/QlikViewforDevelopers_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.