Building BI Analytical Reports from Scratch
In the digital era, intelligent analysis of sales data is becoming an important support tool for enterprise decision-making. This tutorial uses the sales data of the coffee category from a fast-moving consumer goods company as an example to help you quickly build an intelligent sales analysis report driven by natural language, enabling end-to-end automated analysis from data to insights.
You only need to enter a natural language query, such as “Analyze the coffee sales trend of each store in the last quarter.” The system will automatically identify the business intent, optimize and generate SQL query statements, extract the required information from the data source, and automatically generate chart reports. Whether it is sales comparison of different flavors, sales heatmaps across regions, or promotional campaign effectiveness analysis, all can be completed with one click.
The generated reports support style customization, flexible switching of chart types, and can enable the AI insight feature to help you automatically identify the key factors behind sales fluctuations and promptly discover growth opportunities or potential issues.
This tutorial is suitable for beginners in data analysis, business managers, and enterprise users who want to quickly validate sales strategies. It is an ideal starting point for building practical and intelligent sales analysis reports.
Preparing Coffee Sales Data
Before starting to build the report, you first need to prepare the coffee sales data. In this tutorial, we use the daily coffee category sales data of a fast-moving consumer goods company as an example. The data is stored in a SQL Server database and mainly includes two data tables:
coffee_salescoffee_sales_0613
Importing sales data into the database is a prerequisite for the system to recognize and analyze the data. In addition to SQL Server, you can also choose to store the data in other compatible data platforms, such as: MySQL, Azure Databricks

After the data import is completed, you need to obtain the database connection information, including:
- Host (database address)
- Port (port number)
- Username
- Password
- Database name
This information will be used later when adding the data source.
Add Coffee Sales Data as a Data Source
Next, we need to add the coffee sales data tables in the database as a data source recognizable by the system. The steps are as follows:
- Go to the Data module in the system.
- Click “Data Source” in the left menu bar.
- On the data source page, click the “Add Data Source” button in the upper-right corner.
- After entering the “Create Data Source” page, fill in the following information:
- Data source name:
coffee - Data source description:
sales data for coffee - Database type: select
SQL Server - Host: enter the database address
- Port: enter the port number
- Username / Password: enter the authentication information required for the connection
- Database name: enter the name of the database where the sales data is stored
- Data source name:
- Click “Test Connection” below to verify whether the information is filled in correctly.
- After the test passes, click “Confirm” to complete adding the data source.
At this point, the system has successfully established a connection with the database.


Select Coffee Sales Data Tables
After creating the data source, you also need to specify the actual data tables to be used:
- Return to the data source list and click the
coffeedata source you just created. - On the data source details page, select the following two tables as analysis targets:
coffee_salescoffee_sales_0613
- Select and confirm adding them. This step ensures that the system has correctly read and loaded the coffee sales data.
At this point, the coffee sales data has been connected to the system as an official data source, ready to enter the next step of the intelligent analysis construction process.


Sync Coffee Sales Data to the Data Catalog
Although we have successfully added the coffee sales data tables as a data source earlier, the system still cannot view the field structure of these two tables, nor does it have any business semantic descriptions for the fields. Therefore, the next step is to synchronize the table structure in the data catalog and supplement the field information to improve the readability and accuracy of subsequent data analysis.
Sync Steps
- Go to the system's Data module.
- Click “Data Catalog” in the left menu bar.
- Under “Owned Data Source” on the page, find the data source
coffeethat was just added. - The system will display the two data tables under this data source on the right:
coffee_salescoffee_sales_0613
- Click to enter the second table
coffee_sales.

- On the table details page, click the “Sync” button in the upper-right corner:
- The system will automatically pull and display the field structure of the table from the database, including field names and types.
- After synchronization is completed, click “Intelligent Data Knowledge Supplement” in the upper-right corner:
- The system will intelligently supplement information such as business aliases and field descriptions based on the field names.
- If the generated results do not match the actual business, you can manually modify the field descriptions to ensure accuracy.
- Follow the same steps to synchronize and supplement field descriptions for the second table
coffee_sales_0613.
Only through structure synchronization and field supplementation in the data catalog can the system correctly identify the meaning of fields, thereby providing more accurate support when generating reports and insights later.

Create a Business Domain for Coffee Sales Data
To better organize and manage sales data, and to improve reusability and maintainability when building intelligent analysis reports later, we need to create an independent Business Domain for the coffee sales data.
The steps to create a business domain are as follows:
- In the system's Data module, click “Business Domain” in the left menu bar.
- Click the “+ Business Domain” button in the upper-right corner to enter the business domain creation page.
- Fill in the following information:
- Business domain name:
coffee sales - Select data source: choose the data source
coffeeyou just created from the dropdown - Business domain description:
The coffee sales data domain covers the entire process of managing data from coffee product sales records, customer purchasing behavior to sales channels. Analyzing this data helps optimize inventory, improve sales strategies, and enhance customer satisfaction. - Prompt information:
Please ensure the completeness and accuracy of sales data to support effective business analysis and decision-making.
- Business domain name:
- After completing the information, click “Confirm” to finish creating the business domain.


Configure Business Domain Table Relationships
After the business domain is successfully created, the system will automatically enter the business domain configuration page. At this point, you need to add the actual coffee sales data tables to the business domain panel and configure the logical relationships between them.
Add data tables to the business domain panel:
- In the business domain configuration interface, select and check the two tables:
coffee_salescoffee_sales_0613
- After checking them, the two tables will appear in the business domain panel.

Create relationships between tables:
- In the panel, find the
coffee_sales_0613table and locate the “Relationship List” below the table. - Click the “+” button to create a new relationship.
- In the pop-up relationship settings dialog box, fill in the following:
- From table field:
coffee_sales_0613.id - To table field:
coffee_sales.id - Relation Type: select “One-to-One”
- From table field:
- Click “Confirm” to complete the relationship creation.
- After creation, the panel will display a one-to-one relationship line connecting the two tables.

Save the business domain relationship configuration:
Click the “Save” button in the upper-right corner, and the system will store the currently configured table structure and relationship settings.
At this point, the business domain configuration is complete, laying a solid foundation for subsequent intelligent report building. On this basis, the system will more accurately parse data fields and understand data semantics, thereby supporting natural language analysis and chart generation.

Create an Intelligent Sales Analysis Report
After completing data access, data catalog configuration, and business domain construction, we are fully prepared to build an intelligent BI report. Next, we will officially start creating the sales analysis report.
Enter the Intelligent BI Analysis Module
- Go to the Data module in the system.
- Click “Data Agents” in the left menu bar.
- In Data Agents, click “Intelligent BI”
- The system will redirect to the intelligent BI report creation interface.

Select a Business Domain
- Click “Select Business Domain” on the left side of the page.
- In the pop-up business domain list, select the business domain
coffee salescreated earlier. - After successful selection, the page will automatically load the two tables under this business domain:
coffee_salescoffee_sales_0613These data tables will serve as the data foundation for subsequent analysis.



Use Natural Language Queries to Generate Charts
Intelligent BI supports natural language analysis, greatly lowering the barrier to data analysis. Below is a practical example:
- Enter in the natural language input box at the top of the page:
统计不同咖啡类型的销售总量 - After receiving the request, the system will automatically identify the analysis intent and generate the corresponding SQL query statement.
- After the query is executed, the system will automatically generate a visual chart.
By default, the system usually displays data as a line chart. However, in this example, we are more concerned with comparing total sales, so a bar chart is more suitable.

Adjust Chart Style
To improve the readability and visual effect of the report, we can optimize the chart style:
- Click the “Edit Style” button in the upper-right corner of the chart.
- A style editing panel will pop up on the right side of the page, where you can customize the display effect of the chart.
The style settings used in this example are as follows:
- Chart title: change to
销售总量(咖啡类型) - Chart type: select
柱状图 - X-axis field:
coffee_type(coffee type) - Y-axis field:
total_sales(total sales) - Theme style: can be selected according to business scenarios and personal preferences. Here, a blue theme is recommended to highlight a clear and professional visual experience.
The system supports real-time preview of chart styles, allowing you to adjust and view the chart changes at the same time, avoiding the inconvenience of repeated modifications.

After completing the above settings, an intuitive, clear, and data-driven coffee sales analysis chart is built, providing a solid foundation for subsequent insights.
Enable Intelligent Data Insights
After completing the construction of the sales report, we can further use the system's intelligent insight feature to mine potential trends and business opportunities from the data, supporting deeper analysis and decision-making.
Quickly Generate Automatic Insights
- In the upper-right corner of the report page, click the “Insight” button.
- The system will automatically perform intelligent analysis based on the dimensions and metrics of the current chart and output a set of data insight results.
These automatically generated insights include but are not limited to:
- Trend analysis: identify sales change trends, such as a significant increase or decrease in sales of a certain coffee type during a specific period.
- Correlation analysis: determine the correlation between different fields, such as whether there is a sales relationship between a certain type of coffee and store location.
- Difference analysis: identify significant differences between categories, such as differences in sales performance of different coffee types across regions.
- Data summary: the system automatically extracts key conclusions based on the chart content, making it easier to quickly understand the business meaning behind the data.

Customize Natural Language Insights
In addition to the system's automatic insights, you can also enter more specific analysis requirements and initiate deep insights in natural language.
- Enter in the input box below:
各咖啡类型在总销售中的占比变化 - The system will generate new data queries and analysis logic based on this question and return insight content for this topic.
This approach is especially suitable for business personnel to explore data through a “question-driven” method and quickly obtain valuable information. By combining automatic and customized methods, the insight feature not only expands the usability of charts, but also further enhances the intelligence and business value of data analysis.
At this point, a complete sales analysis process of data access → report creation → intelligent insights has been built, providing the business team with an intuitive, efficient, and intelligent data analysis tool.

Publish Intelligent BI Reports
After completing the report creation, you can publish the report for later viewing or sharing.
The system supports two publishing locations:
- My Reports: visible only to yourself, suitable for personal viewing and saving.
- Report Center: visible to team members, suitable for sharing and collaboration.
