All Products
Search
Document Center

Quick BI:Create and Manage Datasets

Last Updated:Jan 14, 2025

Datasets act as a bridge between data sources and visualization tools, transforming input from data sources into data tables suitable for visualization. They are commonly utilized by IT professionals, data developers, and data analysts for data processing tasks. In Quick BI, datasets form the basis for visual analytics. You can create datasets from data tables for analysis, with support for both visual configuration and custom SQL.

Within dataset management, you can associate datasets, conduct secondary data processing and analysis, and edit or rename datasets, which may originate from data sources or be created using SQL.

Prerequisites

You have obtained data. For more information, see connect to data sources.

Feature entry points

  1. On the Quick BI product home page, the following entry points lead to the dataset creation page:

    Entry point one: Create a dataset from the external resource entry.

    image

    Entry point two: Quickly create a dataset from the resource list within the space.

    image

    Entry point three: Create a new dataset on the dataset list page.

    imageEntry point four: On the data source list page, click the image icon next to the target data table to create a dataset.

    imageEntry point five: On the data source list page, click Create dataset using SQL.

    image

  2. Access the dataset creation page. image

Build a model

When the data you want to analyze is distributed across different tables, you can link these tables to construct a model for analysis.

Untitled

For additional information on model construction and data association, see build a model.

Configure fields

Once the model is established, Quick BI automatically previews the data and identifies dimension and measure fields for further analysis.

You can modify the name or type of a field, along with the default display format for numeric or date fields.

Configuration entry points

  • In the field list area, hover over the desired field, click ①, and configure the field.

  • In the data preview area, hover over the desired field, click ②, and configure the field.

image

Feature description

Operation

Description

Edit

Edit the display name and description for a dimension or measure field.

  • Each date granularity field supports configuring the default date display format.

    • Day granularity

      • YYYY-MM-DD (e.g., 2020-01-06)

      • YYYYMMDD (e.g., 20200106)

      • YYYY/MM/DD (e.g., 2020/01/06)

      • MMDD (e.g., 0106)

      • MM-DD (e.g., 01-06)

      • MM/DD (e.g., 01/06)

      • DDMMYY (e.g., 06012020)

      • MM/DD/YY (e.g., 01/06/2020)

    • Week granularity

      • YYYY-W week (e.g., 2020-02 week)

      • YYYYMMDD~YYYYMMDD (e.g., 20200106~20200112)

      • YYYY/MM/DD~YYYY/MM/DD (e.g., 2020/01/06~2020/01/12)

      • YYYY-W week (MMDD~MMDD) (e.g., 2020-02 week (0106~0112))

      • MM/DD~MM/DD (e.g., 01/06~01/12)

      • MMDD~MMDD (e.g., 0106~0112)

    • Month granularity

      • YYYY-MM (e.g., 2020-01)

      • YYYYMM (e.g., 202001)

      • YYYY/MM (e.g., 2020/01)

    • Quarter granularity

      • YYYY-Q quarter (e.g., 2020-01 quarter)

      • YYYYQ (e.g., 2020Q1)

      • FYYYYY-Q (e.g., FY2020-Q1)

      • YYYY fiscal year Q (e.g., 2020 fiscal year Q1)

    • Year granularity

      • YYYY (e.g., 2020)

      • FYYYYY (e.g., FY2020)

      • YYYY fiscal year (e.g., 2020 fiscal year)

  • Measure fields support configuring the default display format and unit conversion method.

Hide

After a field in a dataset is hidden, the field does not appear when you select the dataset for analysis on a dashboard or in a workbook.

Switch Between Dimension/measure Types

Set the field type. Supports date (source data format), geographic information, text, number, and image.

  • You can configure the format of the source data for a date field.

    For example, if the data format for a date field in the source data is 20210101, select YYYYMMDD. This format is used as the date format for the input date values in the query control for subsequent analysis.

    If the desired field is a date field and you want to change the date display format on a dashboard, select the field and configure the date display format on the field edit page.

  • If the desired field is a geographic field such as province or city, and you want to use the field to create a map chart, select the geo type for the field and select the geographic granularity that corresponds to the field.

  • Image

    • Image URL link

      If the desired field is an image field and you want to use the field to display an image on a dashboard when a cross table, ranking board, or ticker board is generated, select the image type for the field. An image field is saved as an image URL.

      Note

      The image URL link must start with HTTPS. HTTP is not supported.

    • Image file upload

      If the desired field is an image field and the field is stored as an image file upload (for example, an image uploaded during data reporting), this method automatically converts the image file into a type that can be displayed and used in datasets and subsequent reports.

      For more information, see image upload.

Date properties

Supports public calendar year and fiscal year.

When you select fiscal year, you can choose the month in which the fiscal year starts.

  • Fiscal year starts in

    You can choose the month in which the fiscal year starts based on your actual needs.

    image

    Note
    • For example, if you set the fiscal year starts in April, then April 1, 2023, to March 31, 2024, is FY24. The calculation logic for year-over-year, quarter-over-quarter, and quarter-over-year is different from the Gregorian calendar year. For more information, see year-over-year and quarter-over-quarter.

    • The fiscal year aligns with the calendar year of the end date.

      • If the fiscal year starts in January: January 2024 to December 2024 is the 2024 fiscal year, FY24

      • If the fiscal year starts in February: February 2024 to January 2025 is the 2025 fiscal year, FY25

  • Week starts on

    Note

    For data sources that support custom weeks (week start time), see data source function item list.

    You can choose the day of the week on which the week starts based on your actual needs.

    imageClick register function to automatically register date functions. image

    • If you do not have "write" permissions for the database, you cannot use the automatic register function feature. You can try to manually download the function script and run it on the corresponding data source.

    • Data sources such as MaxCompute, Presto, Hive, and Apache Doris do not support automatic registration. You need to manually download the function script and run it on the corresponding data source.

Synchronize Date Granularity

Only date fields are supported for synchronization.

If you accidentally delete some date granularity fields, you can click Synchronize Date Granularity to automatically synchronize all date granularity fields from the source data to the dataset.

Note

The datasets that are created in Quick BI V3.7.3 or an earlier version do not contain the ymdhms field. If you want to use this field, you can click synchronize date granularity to add the field.

Copy

Copy a field. The name of the duplicate dimension ends with _Duplicate.

Convert To Measure/dimension

Convert a dimension field to a measure field or convert a measure field to a dimension field.

Default Aggregation Method

Specify the default aggregation method. You can specify the default aggregation method only for a measure field.

During dashboard analysis, the aggregation method that you specified in the dataset is used by default.

Default Display Format

Configure a numeric display format. You can configure a numeric display format, such as Integer or Percentage, only for a measure field.

During dashboard analysis, the numeric display format that you configured in the dataset is used by default.

Empty value display style

  • Dimension fields support setting the display style for empty values or empty strings.

    • Empty values:

    • Strings:

  • Measure fields support setting the display style for empty values.

Note

Custom display of empty values can only consist of Chinese and English characters, numbers, underscores, slashes, backslashes, vertical lines, parentheses, and brackets, and must not exceed 150 characters.

Create Hierarchy

Create a hierarchy based on the current dimension. You can create a hierarchy only for a dimension field.

Hierarchy: For example, you can configure the province, city, and district fields as a hierarchy. After you create a hierarchy, the system automatically drills down through data based on the hierarchy when you configure and drill down through data on a dashboard. For more information about drilling, see drilling.

Move To

Quickly move a dimension to an existing hierarchy or a folder.

Sort

Configure the default sorting method.

During dashboard analysis, the sorting method that is configured in the dataset is used by default.

Delete

Delete a field.

If you want to retrieve a field that you deleted, you can click the table on the canvas and select the field in the right-side panel to add the field.

Select Fields And Drag To Adjust Order

Drag a single or multiple fields to adjust the order or move them to another folder.

Untitled

Note
  • Multi-selection does not support selecting hierarchies, including date hierarchies.

  • Multi-selection does not support selecting fields in date hierarchies (does not support dragging individually).

Notes

If a field is utilized as a calculated field, group dimension, or filter condition, you cannot alter its type, switch it between dimension and measure, or delete it.

Batch configure fields

To edit multiple fields simultaneously, you can configure them in one go.

  1. In the field list area, click Batch Configure.

  2. Select multiple fields and modify their configurations at the bottom of the page. image

    Configuration item

    Description

    Empty value display style

    Support matching settings for empty value display style.

    Convert to measure/convert to dimension

    If all the selected fields are dimension fields, you can convert them to measures in batch.

    If all the selected fields are measure fields, you can convert them to dimensions in batch.

    Hide and unhide

    Support batch hiding or unhiding fields.

    Delete

    Support batch deletion of fields.

    Use description as field name

    Support using description as field name in batch.

Create group dimension

If a field in a data table requires processing before it can be used for analysis, consider using group dimensions and calculated fields.

Group dimensions are useful for categorizing dimension values. For instance, you might divide the province field into regions or segment the customer age field into age groups, such as 0-18 years, 19-40 years, and over 40 years.

  1. On the data preview page, click Create Group Dimension.

  2. On the Create Group Field page, follow the steps to configure the settings, and then click Confirm.

    image.png

    After saving the configurations, a dimension field is added to the dataset. You can enter group names in this column based on the configurations. image.pngFor more details on group dimensions, see group dimension.

Create calculated field

To analyze data that is not directly available from a data table, create a calculated field based on the source data.

Quick BI offers a variety of calculation methods to streamline data processing:

  • Aggregation: For instance, count unique customer names using COUNT(DISTINCT [Customer Name]).

  • Basic operations: Calculate the average transaction amount per customer as [Transaction Amount] / [Number of Customers].

  • Character splitting and merging: Concatenate province and city as CONCAT([Province], [City]).

  • Complex grouping: Define a customer as VIP based on certain criteria using CASE WHEN [Transaction Amount]>1000 AND [Number of Transactions]>5 THEN 'VIP' ELSE 'Regular' END.

For more information on calculated fields, see create calculated field.

  1. On the data preview page, click Create Calculated Field.

  2. On the Create Calculated Field page, set the parameters, and then click Confirm.

    1. Enter a field name.

    2. Click Reference Function and Click Reference Field to edit the field expression.

      When editing an expression, consider the following:

      • You can also type [ in the expression edit box to insert measure field names from a list.

      • Use half-width characters for parentheses and brackets, entered in English input mode.

      • Only functions supported by the data source can be used.

        To view supported functions for a specific data source, refer to the function section on the right side of the New Calculated Fields dialog box or query the supported functions for the data source type.

    3. Select Data Type and Field Type, and then click Confirm.

      image

Create folder

You can organize dimensions and measures into folders by following the illustrated steps.

image

Filter data

To isolate specific data for analysis, you can apply filters to retrieve the necessary information.

Set up multiple field filters to retain data that meets all specified conditions for further analysis. image

Configure filter conditions within the dataset. 数据集过滤条件设置

Custom SQL

Datasets can also be created using custom SQL through the following methods:

  1. Navigate to one of the entry points below to initiate dataset creation.

    • Entry point one: Click Create Dataset Using SQL at the top right corner of the data source page.

      image

    • Entry Point Two: Navigate to the new dataset page and choose a data source from the left panel. If the canvas does not display a data table, select Create The First Table Using SQL Code on the canvas. image

    • Entry point three: On the dataset edit page, select the option to create a table using SQL code.

      image

  2. Input your SQL code into the provided box and click Run.

    image

  3. Test the new SQL code and, once verified, click confirm edit.

    To edit the code, hover over the table on the canvas and click Edit Code, or select the target table and click Edit Code in the right panel.

    image

    Quick BI supports placeholders in SQL code. For additional scenarios and assistance, refer to custom SQL.

Placeholder management

Manage placeholders by clicking the image.png icon in the menu bar at the top of the dataset edit page.

image

Configuration item

Description

Variable name

The name of the placeholder, which can be customized and modified.

Type

The type of placeholder, divided into expression placeholders and value placeholders. The type cannot be modified.

Variable type

Supports text, number, date-year, date-year quarter, date-year month, date-year week, date-year month day, date-year month day hour minute second.

Query default value

The default value effective range supports two modes: dataset only and global effective:

  • Dataset only: Only effective on the dataset edit page.

  • Global effective: Also effective on downstream such as dashboards and workbooks.

The input box allows up to 150 characters.

Note

The default value of an expression placeholder must be a complete expression, such as: area = "Northeast".

Operation

Support delete placeholder.

Create placeholder

Support creating a new placeholder.

image

For detailed operations and use cases, see placeholder.

HINT statements

Click the image icon located in the menu bar at the top of the dataset edit page, and follow the illustrated steps to set HINT statements.

image

For more information, consult the data source function item list to determine which data sources support HINT statements.

Note
  • A maximum of 20 HINT statements can be set.

  • When using SQL to create a dataset, any modification to the HINT statement requires re-running the SQL code to fetch data.

  • The input content length is limited to 50 characters and must consist of English letters, numbers, underscores, and dots.

Switch data sources

If you need to migrate a database, use the Switch Data Sources feature to transfer a dataset's corresponding table from one data source to another.

For instance, if you have synchronized data from MaxCompute to ADB and have already created datasets and dashboards based on the MaxCompute table, clicking Switch Data Sources will prompt Quick BI to automatically switch to the table with the same name in the new data source. Ensure that the corresponding table exists in the new data source.

Syntax may vary depending on the data source type. If the data source changes, verify that the configurations for calculated fields remain valid.

image