Qlik Sense provides an awesome functionality to create Master Items. These Master items can be used throughout the application.
Following Master items can be created:
Need to create Master Dimension and Measures
- Using Master dimension, you can group dimensions.These grouped dimensions can be reused in the entire application
- Using Master Measures, create calculations which can be reused in the entire application
- Business users can utilize these master items in creating their own visualizations
To show how to create Master dimension and measure in Sense, I will use the app which I created in my earlier blog Creating first QlikSense application
In this example,
- I will group the ShipCountry by Regions such as North America, South America, and Others
- Create measure calculation for Sales Sum([Order Details.UnitPrice]) * Sum(Quantity)
Creating Master Dimension in Qlik Sense
1. Open Hub and open your application. For my example, I will open FirstSense app and open my sheet
2. Click on edit sheet
3. Click on Master items and click on Dimensions and Create New
4. Create New Dimensions dialog opens.It can be single or Drill-down. You can select a field on which you want to create a dimension. You can the use expression editor to enter an expression. You can provide a name of the Dimension.
5. In the expression editor, I will provide an expression to group the Ship country by Regions
To learn more about Match function in QlikView, visit my blog http://www.learnallbi.com/using-in-clause-in-qlikview/
6. Repeat steps 1-3 to create Master Measure. The dialog box for creating Measure is shown below.
I will use expression Sum([Order Details.UnitPrice]) * Sum(Quantity) to create new measure
7. Now you can use these master dimension and measure in any visualization within your application
8. I will create a new sheet and drop Simple table. While adding dimension, it will show me the master dimension created previously.
I can add New measure sales, which I created previously as Master item
I can also use my master dimension as a list box. My visualization will look like the following
Add your visualization to the Master Items list
Just right click on your visualization and select “Add to master items”
Creating Master items is a very useful way to enhance your application development and user experience.
You can add Master dimensions and calculations to be used by the developers. Developers or power users can reuse these objects without being aware of the involved complexity.