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
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.
Entry point two: Quickly create a dataset from the resource list within the space.
Entry point three: Create a new dataset on the dataset list page.
Entry point four: On the data source list page, click the icon next to the target data table to create a dataset.
Entry point five: On the data source list page, click Create dataset using SQL.
Access the dataset creation page.
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.
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.
Feature description
Operation | Description |
Edit | Edit the display name and description for a dimension or measure field.
|
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.
|
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.
|
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 |
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. Note
|
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.
In the field list area, click Batch Configure.
Select multiple fields and modify their configurations at the bottom of the page.
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.
On the data preview page, click Create Group Dimension.
On the Create Group Field page, follow the steps to configure the settings, and then click Confirm.
After saving the configurations, a dimension field is added to the dataset. You can enter group names in this column based on the configurations. For 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.
On the data preview page, click Create Calculated Field.
On the Create Calculated Field page, set the parameters, and then click Confirm.
Enter a field name.
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.
Select Data Type and Field Type, and then click Confirm.
Create folder
You can organize dimensions and measures into folders by following the illustrated steps.
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.
Configure filter conditions within the dataset.
Custom SQL
Datasets can also be created using custom SQL through the following methods:
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.
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.
Entry point three: On the dataset edit page, select the option to create a table using SQL code.
Input your SQL code into the provided box and click Run.
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.
Quick BI supports placeholders in SQL code. For additional scenarios and assistance, refer to custom SQL.
Placeholder management
Manage placeholders by clicking the icon in the menu bar at the top of the dataset edit page.
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:
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. |
For detailed operations and use cases, see placeholder.
HINT statements
Click the icon located in the menu bar at the top of the dataset edit page, and follow the illustrated steps to set HINT statements.
For more information, consult the data source function item list to determine which data sources support HINT statements.
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.