Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jfdierckx
Partner - Creator
Partner - Creator

How to share master items between applications ?

The Master Item feature in Qlik Sense allows you to define complex expressions (including Set Analysis calculations for instance) as reusable measures for the end-users.

Currently, the Master Items are defined at application level, and hence, can be shared within the application.

What would be the best way to share these master item definitions between different applications ?

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

One old fashioned way that IS dynamic and was considered a best practice is to use variables to store the expressions in a spreadsheet for example. 

You can blend this approach with master items by using the variable expression as the DEFINITION of the master item

Step1:  Write out your expression in an excel spreadhsheet using syntactically correct Qlik Sense expression

Step1.png

Step2:  load the expression into ONE OR MORE Qlik Sense apps using the load editor

in this example, i load only the 'Regions' master item from the spreadsheet. The expression is stored in the variable 'vRegions'

Step2.png

Step3: Create a new master item with the same name as the loaded expression. 

Now, if ever you want to change the defintion of the 'Regions' master item. Just change the expression in the spreadsheet and reload all the apps ... one place to change everything. Works for Dimensions and Measures

Step3.png

View solution in original post

14 Replies
ogster1974
Partner - Master II
Partner - Master II

My guess would be to build an App that is the base data model to test your data quality and build your master item list.  Not sure you can import master items programmatically yet but would be a nice feature.

I guess we have to copy them in the old fashioned way

Until we can use Master Items directly in our expressions they are a bit of an overhead to be honest except when managing common visualisations e.g. Calendars that can appear on every sheet.

Regards

Andy

JonnyPoole
Employee
Employee

One old fashioned way that IS dynamic and was considered a best practice is to use variables to store the expressions in a spreadsheet for example. 

You can blend this approach with master items by using the variable expression as the DEFINITION of the master item

Step1:  Write out your expression in an excel spreadhsheet using syntactically correct Qlik Sense expression

Step1.png

Step2:  load the expression into ONE OR MORE Qlik Sense apps using the load editor

in this example, i load only the 'Regions' master item from the spreadsheet. The expression is stored in the variable 'vRegions'

Step2.png

Step3: Create a new master item with the same name as the loaded expression. 

Now, if ever you want to change the defintion of the 'Regions' master item. Just change the expression in the spreadsheet and reload all the apps ... one place to change everything. Works for Dimensions and Measures

Step3.png

Alexander_Thor
Employee
Employee

You can import master items, measures and dimensions using the APIs.

I manage my measures in a excel spreadsheet for example and just import them using the APIs.

It's fairly custom as I also specify my main fact field to generate the standard date calculations, YTD/MTD etc etc
But you could most likely simplify quite a bit if you just want to share the definition across apps.

simondachstr
Luminary Alumni
Luminary Alumni

I don't recommend this path as it's not easy to see the underlying expression of the variable by double-clicking on it, as you can do on the Master Item list.

jfdierckx
Partner - Creator
Partner - Creator
Author

Is there a tool available somewhere that would use the API to manage the master items in a central way ?

simondachstr
Luminary Alumni
Luminary Alumni

I am sure akl‌ will be happy to share his example of importing measures from Excel. Maybe on branch?

Anonymous
Not applicable

Hi!

could you post an example please??

thanks!!

JonnyPoole
Employee
Employee

This project will allow for sharing of master items from a central external repository.

Home - EA Powertools Governed Metrics Service

adriennn
Partner - Contributor II
Partner - Contributor II

Hello, 
we've release an extension for this purpose, which is lightweight in comparison to the EA Powertools: MasterConfig see our blog post on the matter.
-adrien