All Products
Search
Document Center

Quick BI:Configure Global Variables

Last Updated:Apr 30, 2024

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.

    Note

    The 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 image.pngis hidden and displayed only after you save it. The following figure shows the global parameter configuration page.

image

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:

  • The display name can be a maximum of 50 characters in length.

  • Only English, numbers, and underscores are supported.

You can click the 新建icon to create multiple global parameters.

3

Select a parameter to associate the control with the chart.

  • If the associated object is a query control, you must select an associated condition in the query control. The display type of the associated condition of the query control limits the value type range of subsequent global parameters. For example, global parameters in the text type or single date format cannot be injected into date interval components. If the display types of the associated conditions of the query control conflict with each other, the global parameters cannot be saved.

  • If the associated object is a chart, the system classifies the charts by dataset. If you select a field in the dataset and select the target chart, the conditions injected by global parameters are automatically added to the SQL query of the selected chart. If you select fields from multiple datasets, the types and granularities (year, month, day, hour, minute, and second) of the selected fields must be the same. Otherwise, the parameter configuration fails.

  • If you want to associate a query control and a chart at the same time, the associated condition type of the query control must be the same as the field type of the chart dataset. The associated condition of the query control limits the input value model. Therefore, when you inject global parameters, you must meet the requirements for the associated condition of the query control to ensure that the query control and the chart take effect at the same time.

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:

  • Query control and Chart field selection types support time (not hours, minutes and seconds), text (including geography, url), numeric, and placeholders.

    For more information about how to configure placeholders, see Placeholders. image

4

The parameters related to the model.

  • Parameter Name: By default, the parameter name is the same as that of the global parameter. The title must meet the following requirements:

    • The display name can be a maximum of 50 characters in length.

    • Only English, numbers, and underscores are supported.

    Note

    If you do not specify the Parameter Name parameter or a parameter configuration conflict occurs, an error message is displayed. In this case, the global parameter cannot be saved.

  • Parameter Alias: If you need Chinese information, you can set it here.

  • Required: If you select this option, the query control and chart check whether the corresponding parameter has an injected value. If no injected value is available, the query control preferentially uses the default value that is set in the editing state. In this case, the chart fails to be retrieved.

  • Allow Query Control to Change input value: If you select this option, the subcondition associated with the corresponding parameter is locked in the preview state by default. This means that the operator and value of the subcondition cannot be changed.

Note
  • 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).

  1. After you log on to the Quick BI console.

  2. Go to the target dashboard.

  3. On the Taobao product order details dashboard, create a product information cross table and configure global parameters for the cross table.

    1. On the Data tab, select Sales Data as the dataset and name it Taobao Product Order Details.

      image

    2. Add a cross table to the dashboard and name it Product Information. In the top navigation bar of the dashboard, click Save.

      image

    3. In the top navigation bar, click the 全局参数icon.

    4. In the Configure Global Parameters dialog box, configure global parameters as shown in the following figure and click OK.

      image

    5. In the top navigation bar, click Save and Publish.

  4. In the Order Details dashboard, create a Order Information list and configure a Product Information cross table.

    1. On the Data tab of the dashboard edit page, select Sales Data as the dataset and name it Order Sales Details.

      image

    2. 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.).

      image.png

    3. Click the Analysis tab. In the Data Interaction section, click the image.pngicon next to Redirection Configuration.

      image.png

    4. 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.

      image

    5. 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.

      image

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.

  1. 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. image

    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.

  2. 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. image

    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.