Linking Section Access to multiple dimensions

Packt Publishing

Take your QlikView training to the next level with this brilliant book that’s packed with recipes which progress from intermediate to advanced. The step-by step-approach makes learning easy and enjoyable.

Note that there is a loop error generated on reload because there is a loop in the data structure.

How to do it…

Follow these steps to link Section Access to multiple dimensions:

Add list boxes to the layout for ProductGroup and Country. Add a statistics box for Sales.

Remove // to uncomment the Section Access statement.

From the Settings menu, open Document Properties and select the Opening tab. Turn on the Initial Data Reduction Based on Section Access option.

Reload and save the document. Close QlikView.

Re-open QlikView and open the document. Log in as the Country Manager, CM1, user. Note that USA is the only country. Also, the product group, GroupA, is missing—there are no sales of this product group in USA.

Close QlikView and then re-open again. This time, log in as the Sales Manager, SM2. You will not be allowed access to the document.

Log into the document as the ADMIN user. Edit the script. Add a second entry for the SM2 user in the Access table as follows:

USER, SM2, GROUPA, USA

USER, SM2, GROUPB, UK

Reload, save, and close the document and QlikView. Re-open and log in as SM2. Note the selections.

How it works…

Section Access is really quite simple. The user is connected to the data and the data is reduced accordingly. QlikView allows Section Access tables to be connected to multiple dimensions in the main data structure without causing issues with loops.

Each associated field acts in the same way as a selection in the layout. The initial setting for the SM2 user contained values that were mutually exclusive. Because of the default Strict Exclusion setting, the SM2 user cannot log in.

We changed the script and included multiple rows for the SM2 user. Intuitively, we might expect that, as the first row did not connect to the data, only the second row would connect to the data. However, each field value is treated as an individual selection and all of the values are included.

There's more…

If we wanted to include solely the composite association of Country and ProductGroup, we would need to derive a composite key in the data set and connect the user to that.

In this example, we used the USERID field to test using QlikView logins. However, we would normally use NTNAME to link the user to either a Windows login or a custom login.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.