Quick BI provides global parameters for you to configure variables. When you configure a chart, you can reference global variables to push different data to different users. This topic describes how to configure global parameters in scenarios such as redirection, email subscription, and report embedding.
Background information
For example, a sales team that serves all regions in China must track the sales in more than 30 provinces, as well as cities and counties of each province in real time. As the business continuously grows and expands, the team must view an increasing amount of sales data. Among the complex and massive data, Quick BI provides a solution that enables the person in charge of a region to view only data in this region. This improves the work efficiency and prevents the leak of sensitive business data.
Global parameters are a standardized entry point for the report, allowing report users to dynamically change the filter conditions of the internal chart and query controls of the report through URL parameter injection when previewing the report, so as to achieve the effect of externally controlling the internal data display results of the chart. Global parameters can be used in the following ways:
Query control: After a query control receives a global parameter, it directly uses the conditions injected by the global parameter as the default value and binds it to a specific child component.
NoteThe graph of the actual effect also needs to depend on the range of effect selected for the corresponding sub-component. Because only the default value is changed, the report user can actually change the actual value of the subcomponent to get out of the control of the global parameter.
Chart: the chart to which global parameters are associated. In essence, the and fragment is added to the query SQL statement at the end of the chart, for example,
and area ='North China'
. This process is generated by the server directly parsing the global parameter configuration. Therefore, report users cannot change the result. They can only use the sqlText that is finally generated to verify the data result.
Global parameter configuration description
The entry for global parameter configuration is located at the top of the report. When you create a report, the global parameter icon is hidden and displayed only after you save it. The following figure shows the global parameter configuration page.
Section | Description |
1 | The global parameter configuration entry. The configuration of global parameters depends on the component data model inside the report. We recommend that you reconfigure global parameters each time you update the chart model. |
2 | Configure global variables The title must meet the following requirements:
You can click the icon to create multiple global parameters. |
3 | Select a parameter to associate the control with the chart.
Note To ensure the accuracy and effectiveness of parameter injection, you should try to ensure that the responsibility of each parameter is clear and single in actual use. Be careful to associate a global parameter with multiple query controls, or use query controls and datasets in a mixed way. If your business needs, we recommend that you add multiple parameters to control different query controls and charts. Field selection:
|
4 | The parameters related to the model.
|
In order to ensure the validity of parameters, global parameters are detected in real time during the configuration process. If a parameter conflict occurs, all global parameters cannot be saved.
The process of configuring global parameters depends on the content of the current report. If the report changes, the injection of the configured global parameters may become invalid. Therefore, we recommend that you check whether the configuration of global parameters is valid after each report change. If the configurations of global parameters conflict with each other, modify the parameters as prompted.
Scenarios for global parameters
Jump Scene
The following example shows how to jump to a cross table (product information) in a leaderboard (order information).
After you log on to the Quick BI console.
Go to the target dashboard.
On the Taobao product order details dashboard, create a product information cross table and configure global parameters for the cross table.
On the Data tab, select Sales Data as the dataset and name it Taobao Product Order Details.
Add a cross table to the dashboard and name it Product Information. In the top navigation bar of the dashboard, click Save.
In the top navigation bar, click the icon.
In the Configure Global Parameters dialog box, configure global parameters as shown in the following figure and click OK.
In the top navigation bar, click Save and Publish.
In the Order Details dashboard, create a Order Information list and configure a Product Information cross table.
On the Data tab of the dashboard edit page, select Sales Data as the dataset and name it Order Sales Details.
Create a ranking board and name it Order information. The following figure shows the fields that you need to configure for Category (Dimensions), Indicator (Measures), and Auxiliary indicators (Mea.).
Click the Analysis tab. In the Data Interaction section, click the icon next to Redirection Configuration.
In the Go dialog box, set the parameters as shown in the following figure and click OK.
For more information about jump settings, see Jump settings and display.
Click the order number that you want to view in the Order Information section. You are redirected to the Taobao product order details dashboard, and the trademark information of the order number is displayed.
The following figure shows the page that appears.
Email subscription scenario
When performing an email subscription task, you can use global parameters to inject filter conditions into the charts in the report. The following section describes the use of global parameters in email subscription. For more information about how to create a subscription task, see Create a subscription task.
On the Create Task page, set Content to a dashboard that has global parameters configured.
If you set this parameter to a dashboard that has global parameters configured, the system automatically displays the corresponding global parameters. The initial status of the global parameters is Not Configured. By default, the global parameters do not take effect.The parameter value is set to null and the parameter is not set. If you set the Parameter Value parameter to an empty value, the value of the associated condition is reset to an empty value. If you do not set the Parameter Value parameter, the query controls and charts are not affected.
Click the icon in the Actions column to configure global parameters.
The content of the parameter configuration items is automatically matched with the type of the field associated with the parameter. When you associate a chart, the parameter configuration allows you to switch the conditional form. When you associate a query control, you can only change the operator and value.
After you configure the parameters for the subscription task, the parameters are automatically injected into the filter conditions of the report each time you perform the subscription task.