Managing data with dynamic views
Dynamic views offer users the ability to directly control both the analytic sources they want to explore and when data is refreshed in visualizations.
Dynamic views enable you to query and view relevant subsets of large data sets in charts that can be dynamically refreshed as selections are made. This enables up-to-date visualizations for high data volume or fast-changing data scenarios.
Dynamic views overview
Dynamic views enable you to connect a base app to another app. Master visualizations from that app can then be used in the base app. This enables app creators to use master visualizations from the template app as dynamic charts in other apps. There is no limit to the number of dynamic views you can add to your base app.
Dynamic views are made from three main components:
- Dynamic views: A mechanism added to base apps that connect to template apps and enable app creators to add master visualizations from the template app to the base app.
- Dynamic view template apps: A Qlik Sense app containing connections to data sources, such as cloud databases.
- Dynamic charts: Master visualizations in the dynamic view template app that can be added to base apps and that can be manually refreshed by users.
The template app and the base app do not need to use the same data. If you have a data set covering customer purchases, you could add a dynamic view to a template app containing weather data to look at any correlations.
If the data queried from the template app’s source can be filtered using values in your base app, you can use binding expressions in the template app’s script. This enables the dynamic view to only query a subset of data specifically related to the selections in the base app from the data sources of the template app. For example, you could bind the field SalesDate in the base app to the field DailyTemperatureReadingDate in the template app.
This subset capability is useful if your base app contains aggregated data and the dynamic view data is from the same source but is more granular than the base app data (e.g. the base app contains sales by month and product brand while the template app contains sales by day and product name). For more information on adding binding expressions to template apps, see Binding expressions in on-demand template apps.
Dynamic views can be used with any kind of data. Dynamic views are particularly useful when dealing with large volumes of data or fast changing data scenarios, where it is better to perform data aggregations on the database. This helps avoid latency in data transfers from the data source.
Dynamic views are accessible from the Assets panel. Dynamic views are enabled by administrators in QMC. For information about enabling dynamic views, see Managing on-demand apps.
Dynamic views are similar to on-demand app generation. Both use template apps to offer on-demand data, but dynamic views allow you to use individual charts in sheets rather than generating whole on-demand apps. If you are also using on-demand apps, you can create dynamic views using your on-demand template apps. For more information about generating on-demand apps, see Managing big data with on-demand apps.
When you create a dynamic view, you select a template app and optionally apply a row limit expression to control how much data the dynamic view will access. Once the dynamic view is created, you can then add master visualizations from the template app to your sheets.
Multiple dynamic views can use the same template app. Each dynamic view is refreshed individually. If bind expressions are used in a dynamic view’s template app script, selections made in the base app can control which data is loaded into each dynamic view that uses that template app. Two dynamic views using the same template can be used to compare side-by-side charts of two separate subsets of granular data. For example, you have two dynamic views using the same template app. You could select Jan 1, 2018 from the base app SaledDate field and refresh one dynamic view. You could then change the selection to Jan 1, 2019, refresh the other dynamic view, and then compare the dynamic charts.
When a user accesses an app containing a dynamic view, an on-demand app is added to their Work. This app contains the dynamic view template app with the current data and is used to populate the base app with the dynamic view. It is replaced by a new version every time the dynamic view refreshes. If the user is not the owner of the dynamic view template app, the load script will be removed. These apps are deleted 24 hours after the last refresh.
For information on creating and editing dynamic views, see Managing data with dynamic views.
For information on using dynamic views, see Using dynamic views and charts.
Dynamic view template apps
A dynamic view template app is a Qlik Sense app used to supply dynamic views with data and master visualizations.
Dynamic view templates can have a load script that contains data binding expressions used to formulate queries made on the data sources based on selections made in the base app. Binding expressions are usually created by users with experience writing Qlik Sense load scripts. Template apps can have query filter conditions that are based on input parameters supplied during the activation of dynamic charts.
Once the data model of a dynamic view template app is complete, master visualizations can be added to the template app. These master visualizations can then be accessed through dynamic views and added as dynamic charts in other apps.
For information on creating template apps, see Creating an on-demand template app.
Dynamic charts are derived from the master charts of a dynamic view’s template app. Dynamic charts can be added to the sheets of other apps using dynamic views. Unlike other Qlik Sense charts, users can control when the source data in a dynamic view is refreshed using a refresh option in the charts. When a dynamic view’s data is controlled by bind expressions, Qlik Sense tracks the base app selection state. A stale data icon appears on each chart of a dynamic view whenever the base app's selection state changes so that the new value sets for and off the dynamic view's bound fields no longer match the values used for the view's last refresh.
For information about using dynamic charts, see Using dynamic views and charts.
Dynamic views limitations
Dynamics views have the following limitations:
- Dynamic views are not supported with stories. You can add snapshots of dynamic charts to stories, but cannot use go to source with a dynamic chart.
- Dynamic views are not supported with Qlik NPrinting.
- Dynamic views support the dashboard and visualization bundle extensions. No other extensions are supported.
- Dynamic view ownership does not change with app ownership.
- Dynamic views cannot be created in apps in a managed space.
- Dynamic views are not supported in Qlik Sense Desktop.
- Dynamic charts cannot be placed in a container.
- Trellis containers and containers are not supported as master charts in dynamic views.
- Dynamic views are not supported for anonymous users.
Streams and dynamics views
You can create dynamic views to any app to which you have access. You can make dynamic views to your published apps in streams and to your unpublished apps in Work. You can also make dynamic views to published apps owned by other users in streams to which you have access.
Users with access to an app with a dynamic view can use the dynamic view even if they do not have access to the template app.
Dynamic views cannot be added to published apps. Apps can be duplicated and republished to add new dynamic views.