Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Feb 9, 2023 9:34:23 AM
Nov 15, 2021 9:17:41 AM
This article gives an overview of the measure distribution use case. It explains a basic example of a template configured for this scenario and additions for a more advanced use case.
For this use case, we will define the following keywords/expressions:
By using this approach, all you need to do is create/update your master items in your main app, and then push these updates to all your destination apps. This way, all destination apps have the same master items.
To support this use case, we created a basic template, which uses measures as master items.
By running this template, you will be able to distribute all the measures created in your main app to all the apps available in the destination space.
All you need to do is select your main app and your destination space.
Of course, this is just a basic implementation. This template can be upgraded to suit more advanced scenarios.
Let's go over a few examples:
The changes made by this automation won't be accessible immediately in other sessions (like the Qlik Sense UI) more info on that can be found here: Automation session delay. It can take up to 40 minutes for these changes to be visible in other sessions, if these changes are needed sooner in these sessions, the Save App block can be used. But keep in mind it can only be used once for every app that's changed by the automation. More information on the Save App block can be found here: How to use the Save App block.
For the above example, it's best to add an additional List Apps block that's configured exactly the same as the first one so, it returns the same apps. We'll add a Save App block in the loop of the new List Apps block and configure it to run for every app that's returned. This way, we make sure that the Save App block is executed only once for every app that was changed. See the image below for an example with the Save App block.
First part: includes an input block for the source/destination apps and for the measure tags.
Second part: includes a measure deletion flow, for a complete sync automation process.
Both these template examples are available as attachments.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
Hi,
I have tried the automation template for distribution of master measures and it fails to create measures which contains SET expressions with double quotes, for example:
Sum({<Year={"$(=max(Year))"}>}Sales)
I also had same issues where the measure expression was entered across multiple lines (including line breaks).
Can you please provide an example on how you can copy across master measures that may contain double quotes, line breaks etc. Do you need to convert the expression using some formula or other block?
Kind regards,
Mats
Hello,
why is "List Of Apps for Lookup" limited to 100? The output of a block should be the same as "Maximum number of items to retrieve"!
Can I use List of Apps for the Input from a specified Space?
Hello @hanselalf I'm looking into this for you; currently, this is how the API would function, but I will reach out to our product management team to find out how pagination is meant to be handled if you have over a hundred apps.
All the best,
Sonja
Hello @hanselalf This was confirmed as a limitation. I would recommend logging an idea/suggestion so our product management team can review the suggestion accordingly.
All the best,
Sonja
Hallo @Sonja_Bauernfeind
On Enterprise level, you will (allways) have mor than 100 apps (we have). The apps are read of the hole Server, space info is also nessesary!
This behavior is a bug, so I will create a support case.
Hi @Ionut_Dumitrascu @Emile_Koslowski @Sonja_Bauernfeind,
In the output of my Create or Update Measure block, I get the error the the GetLayout method is not found: