Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jfdierckx
Contributor

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 ?

10 Replies
ogster1974
Honored Contributor II

Re: How to share master items between applications ?

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

Employee
Employee

Re: How to share master items between applications ?

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

Employee
Employee

Re: How to share master items between applications ?

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.

Luminary
Luminary

Re: How to share master items between applications ?

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
Contributor

Re: How to share master items between applications ?

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

Luminary
Luminary

Re: How to share master items between applications ?

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

daiana_rossignol
New Contributor III

Re: How to share master items between applications ?

Hi!

could you post an example please??

thanks!!

Employee
Employee

Re: How to share master items between applications ?

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

Home - EA Powertools Governed Metrics Service

adriennn
New Contributor

Re: How to share master items between applications ?

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

Community Browser