One of the best features in Qlik Sense is Master Items (or Master Library). We will cover some tips to make your Qlik Sense Master Items shine.
Qlik Sense Master Items – Why You Need Them
The Master Items list can contain dimension fields, expression definitions or even complete visualizations that are curated and standardized for the users. There are several benefits to creating a Master Library for each of your Qlik Sense apps.
1. Happy Developers – Makes expression maintenance easy for the developer. In the other product, QlikView, we create variables and dump definitions into them for reuse. With Qlik Sense, we now have a real mechanism purpose-built for reusability. Any changes made to a Master Item percolate through the entire application.
2. Happy Users – Creates an intuitive way for users to build their own analysis. When a developer creates this Master Library, the user need only drag-and-drop to create visualizations. This eliminates the need for users to understand Qlik Sense expression syntax.
3. Happy Data Stewards – Because there is a centralized, single definition for each item and it is created by the developer, we can better create One Version of the Truth for our application.
Planning Your Qlik Sense Master Library
The first thing you will want to do is create three lists. Create one for all the dimensions your users will need to display. Then make a list of the common expressions users will require. Finally you should design an example set of visualizations for the user to utilize as a jumping off point for their own objects.
You should not be too concerned about covering every single field or every single metric that could ever be imagined. All the fields in the app are still available from the horizontal selections bar. And of course, users still have the ability to build an expression.
Tip: If there are key fields or unassociated fields that should not be shown in any list, rename those fields with a special character like “%” or similar. Then create a line of code in your script:
Just like in QlikView, this will effectively hide these fields from the user’s view (including your own view). Taken to the extreme, you could prepend all fields and then create your Master Dimensions and Master Expressions, thereby making only your approved Master Items available to users.
Creating Your Master Items
There are actually several ways to create items for your Master Items lists. We will go through each of them.
Method 1 – Data Model Viewer
Master Dimension or Expression can be added in the Data Model Viewer in preview mode. In the pics below we will add a Customer Master Dimension:
Method 2 – Field Lists
The second way to create a Master Item is to access the fields list in edit mode. This time, we created a drill-down dimension choosing hierarchal date fields.
Method 3 – Master Item List
The third way to create a Master Item is to add it directly in the Master Item pane. Here we will add a Master Expression. Master Expressions are probably the most useful since the user no longer will have to memorize expression syntax.
Tip: Assigning a tag to a Master Item makes it searchable by that tag. In this example, searching “Sales” displays the bar chart since it contains the master definition tagged with “Sales”.
Tip: Note also that surrounding the expression with the num function will save the user from having to update the number format every time the expression is dragged into a new object.
Tip: Unfortunately we cannot refer to existing Master Expression names to create new Master Expressions. But we can still create variables that house expression definitions. So theoretically, we could store base expressions in a variable and then use them to create our Master Expressions. This might be more trouble than its worth unless we have complex, repeated, set analysis
Method 4 – Design Grid
The last way to create a Master Item is from within the design grid. Here we add a Master Visualization to our Library:
Utilizing Master Items as a User
Now comes the fun part. Once the Master Items are created, creating visualizations becomes super simple.
Firstly, you should be aware that Qlik Sense Master Items cannot be added to, deleted from or adjusted in a published application. In fact, the field tab that usually appears on the left with your Master Library is removed from published streams.
To add a Qlik Sense Master Item to an object, click on the Dimension or Expression button inside the object. Note the Master Items float to the top when you click on Dimensions or Expressions. The other fields will appear underneath.
Master Library items can also be dragged directly into an object.
Here is a wish list of future enhancements I hope get added to this feature:
- Ability to categorize and/or sort the Master Items lists.
- Would be great to reference existing Master Expression in a new Master Expression (like we can in QlikView). I find myself having to clumsily copy and paste blocks of code and then adjusting to create new measures.
- The ability to drag Master Expressions to other fields that can hold an expression like color expressions, for example.
- It would also be great to be able to create Master Items that are hidden. This way I could still govern all the expressions, but would not necessarily have to expose them to the user.
As we rapidly approach the promised-land of true Self-Service BI, we still have some way to go on the data prep side. But the addition of Qlik Sense Master Items brings the dashboarding part of the equation to fruition. Please be a good developer! The small effort of creating these Master Libraries will bridge that Last Mile for your users, giving them a true self-service experience.
If this post was helpful to you, please consider sharing it with your network. It means the world to me when you read an article, actually enjoy it or learn something and then click on one of the share buttons below to tell others. I appreciate your support and your participation in our community.