Skip to main content Skip to complementary content

Loop and reduce in Qlik Cloud

With the loop and reduce functionality in Qlik Cloud, you can use a single master app to manage several related apps. All related apps can have their data updated from the master app.

How loop and reduce works

When you loop and reduce, you collect data by using a QVD generator app. The QVD generator app typically has a script that selects data only from a few fields in a larger data set, for example, the fields Region and Product from a data source, such as an Excel file. When you run the script in the master app, all the related apps that are stored in different managed spaces are automatically updated.

Loop and reduce example

The following example shows the master app stored in a shared space. An empty app is published to the managed spaces 1-4. The managed spaces can have local data files or data connections from which they can perform reloads. When new data is available, the master app is reloaded and the related apps are updated with the latest data.

Loop and reduce example with master app connected to apps in managed spaces

There are several benefits to this approach:

  • Single source – a master app, which is very light, because it doesn't contain any data, only the logic in the script.

  • Easy maintenance of the master app, due to its light weight.

  • Related apps in different managed spaces – supports flexibility; security can be set on the space, the app, or both.

How data is transferred into the spaces

The script in the QVD generator loops through the selected fields and stores the collected data in a QVD data file. The script then stores the data file in each of the managed spaces. When the master app is reloaded the related apps are updated with the latest data.

The QVD generator transfers the selected data into the apps

Setup of loop and reduce

The following is required to set up loop and reduce:

  • Master app, stored in a shared space

  • Managed spaces, one for each reduced app

  • Empty app, published to each managed space

  • QVD generator, an app that generates a data file

Visit the discussion forum at community.qlik.com

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!