All Products
Search
Document Center

Quick BI:Configure global parameters

Last Updated:Jun 08, 2023

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 全局参数is hidden and displayed only after you save it. The following figure shows the global parameter configuration page.

image

Area

Description

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.

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.

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. Be careful to associate a global parameter with multiple query controls, or use a combination of query controls and datasets. If you need to use multiple parameters, we recommend that you add multiple parameters to control different query controls and charts.

Field selection:

  • the query control and chart field selection types support time (not time, minute, second), text (including geography, url), numeric, sql parameters, and sql placeholders.

    For more information about how to configure SQL parameters and placeholders, see Parameters and placeholders.

字段配置

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 appears. 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
    3. Click the Advanced tab. Click the icon next to Hyperlink in the Advanced Settings section.编辑

    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 manage 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