Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
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
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'
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
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
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
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'
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
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.
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.
Is there a tool available somewhere that would use the API to manage the master items in a central way ?
I am sure akl will be happy to share his example of importing measures from Excel. Maybe on branch?
Hi!
could you post an example please??
thanks!!
This project will allow for sharing of master items from a central external repository.
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