Skip to main content

Creating an on-demand selection app

An on-demand selection app provides the means for selecting subsets of large data sets so that the Qlik associative engine can make associations efficiently and effectively. In very large data volume environments, we recommend that you have the selection app load only a modest level of dimension granularity. For example, a selection app whose data is based on sales data aggregated by quarter, region, and product category could use an SQL SELECT statement such as the following:

SELECT 	SUM(S.UNIT_COST) AS TOTAL_UNIT_COST,
	SUM(S.QUANTITY) AS TOTAL_QUANTITY,
	SUM(S.UNIT_PRICE * S.QUANTITY) AS TOTAL_SALE,
	SUM( (S.UNIT_PRICE - S.UNIT_COST) * QUANTITY) AS TOTAL_PROFIT,
	SUM(1) AS TOTAL_LINE_ITEMS,
	S.REGION,
	S.YEARQUARTER,
	S.PRODCAT,
FROM SALE_DETAIL S
GROUP BY S.REGION, S.YEARQUARTER, S.PRODCAT

The on-demand measure expression property is typically based on a computed aggregate result from an SQL GROUP BY query used to load the data. Because the selection app uses a GROUP BY query to aggregate the SALE_DETAIL records, an aggregation function--in this case SUM--must be used on the measure fields of UNIT_COST, QUANTITY and the computed values for TOTAL_SALE and TOTAL_PROFIT.

The SUM(1) AS TOTAL_LINE_ITEMS provides a way to precisely measure the total number of sale line items for every distinct combination of region, quarter, and product category. When creating a link used to produce on-demand apps, a measure expression must be supplied as way to control the number of records loaded into the on-demand apps. In the SALE_DETAIL example, when a user selects multiple product categories, regions, and/or quarters, a sum can be computed for TOTAL_LINE_ITEMS to determine whether or not the selection exceeds the record limit for the on-demand app.

Information noteThere is a sample on-demand selection app included in the Qlik Sense Enterprise on Windows installation at ProgramData\Qlik\Examples\OnDemandApp\sample.

Record limits are specified when the selection app is linked to a template app to create an app navigation link. Each app navigation link has a record limit. Multiple navigation links can be created from the selection app. Multiple app navigation links are commonly made linking a selection app to different template apps in order to produce multiple views of data.

Individual on-demand app navigation links can be included in a selection app for publication. Once included in the selection app, an app navigation link is used to create one or more app navigation points that make it possible for users of specific sheets to create on-demand apps based on that link’s template app.

For information about how to create an on-demand app, see Building an on-demand app.

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!