Two ways to activate and run a sub-query are:
To run a sub-query using a primary query:
In Interactive Reporting Studio , open the sample Conditional Sub-Queries component document (Conditionalsubqueries_sample_esm.bqy).
Process Event Example displays the primary query results and the results of the attached sub-query. Primary Query Results (Limit Lookup Table) is empty to conserve space, as the results are not saved with the document.
Click Process Selected values in Primary Query, and launch Sub-Query to get detailed results.
If the Filter dialog box is displayed, select filter values, and click OK.
For example, select Store Type, then Computer and click OK. Select OS, then SCSI, and then click OK.
Primary Query Results (Limit Lookup Table) displays the key values identifying the items of interest; for example, Store Type and Os.
The Conditional Sub-Queries component detects a primary query was processed and activates the attached sub-query, by using the Limit Lookup Table as a filter. As a result, Sub-Query Results is updated to reflect the values in the Primary Query Results (Limit Lookup Table).
To run a sub-query using a custom user event:
In Interactive Reporting Studio , open the sample Conditional Sub-Queries component document (Conditionalsubqueries_sample_esm.bqy).
From Sections, select User Event Example.
The section displays information about under-performing stores whose transactions are below a certain amount. The Limit Lookup Table is the results section of a regular query, that is saved with the document and displayed when opened.
From with transactions below $, select a value.
For example, select $200 to enable the filter in the Limit Lookup Table to display keys that identify stores with daily sales below $200. The action also passes a <Dropdown Selection> custom event to the Conditional Sub-Queries component, which launches the associated sub-query.
Sub-Query Results (Details of underperforming stores) displays the stores with daily sales below $200.
In these instances, there is no need to embed a results section or a Limit Lookup Table in dashboard sections for the component to work. The sections are illustrations only. Charts, pivots, or tables created from sub-queries can be embedded to provide more information for end users.