With effect from 2022-03-24 dashboard release:
...
Please refer to this page to see a walkthrough of a sub-query filter.
How does Sub-query work:
when using an in/not in operator - the first column of the data from the sub-chart is used (multiple values, as described on the tooltip in the screenshot)
top/bottom operator - when using a top/ bottom operator, the option to select a chart to filter on will not be available
single value operator e.g. Like - the first data point (first row of the first column) is used as the filter value
...
The screenshot below shows the chart types that can be selected from. If a chart type can not be used in a sub-query it will not be available on the' Charts' screen under ‘Type to filter’.
...
Why use sub-query
...
By using Sub-query mainly enables the following capabilities, you will be able to:
it allows use sub-chart data from another data connection, e.g. in the following example.
chart 1 is from a Sales data connection
chart 2 is from a HR data connection
chart 1 can have a filter, and the value is be filtered using chart 2
this means you can could view the sales related to employees who take a lot of holidays
it allows use sub-chart data from another chart, which is built with complex sql query structure
Performance with sub-query:
Since sub-query charts are building charts to be used by other charts, the time it takes to display a chart will be the total time it takes to build all the charts used. You can see a breakdown of these times by clicking Chart Tools>Chart Information and selecting the ‘Debug’ tab - add screenshot..
...
In this example, the total time to build all charts is 748ms. This includes the 309ms taken to build the sub-query chart.
...
Info |
---|
To reduce the length of time taken to draw your chart, try to avoid using lots of sub-query references in your charts. |
...
Potential problems:
Cycle referencing: If Chart 1 uses Chart 2, Chart 2 uses Chart 3, Chart 3 uses either Chart 1 or Chart 2 as sub-query, the system shows an error
Sub-charts are changed: If a sub-chart is edited afterwards, you may get unexpected results on the main chart while the main chart is not likely to be broken, because the main chart simply just picks the first column or first data point of the sub-charts, it doesn’t care how the sub-charts are configured
Sub-charts not having data: again, the main chart is not likely to display data since there isn’t anything relevant