Beginner's Guide Case
1 Overview
Through this case, quickly experience the entire process from metric definition to analysis. This case will create the following sales-related metrics based on the order table, and present visualization effects on data analysis cards to analyze the sales profit situation in various provinces.
Metric Name | Metric Type | Calculation Method | Business Definition |
---|---|---|---|
Total Cost Price | Atomic Metric | sum(order table cost price) | Valid total cost amount |
Total Sales Revenue | Atomic Metric | sum(order table sales revenue) | Valid total sales amount |
Sales Gross Profit | Composite Metric | Total Sales Revenue - Total Cost Price | Sales gross profit = Sales revenue - Cost price |
Sales Gross Profit Year-over-Year | Derived Metric | Year-over-Year/Period-over-Period - Year-over-Year - Growth Rate | Sales gross profit year-over-year ratio |
2 Operation Steps
Step 1: Connect Dataset
In the "Data Preparation" module of Guandata BI, connect the dataset needed to create metrics. This example uses local Excel file import. For specific operations, see Connect Local Files.
Original data table: Visualization Chart Practice Data.xlsx

Step 2: Create Public Dimensions
Enter the "Public Dimensions" module. According to dimension analysis needs, we will set province as a public dimension. Associate the province field from datasets that will be used in the future, and subsequently the dimensions representing provinces in different metrics will be uniformly named "Province".


Step 3: Create Metrics
Create Metric Topics and Folders
Enter the "Metric Topics" module, create a new "Sales Status Statistics Topic" and "Profit Situation" folder to create metrics related to this sales status statistics - profit situation.


Create Atomic Metrics
Click "New Metric" in the "Metric Topics" module and select atomic metric.

Create the first metric "Total Cost Price". After filling in the information, click "Save". Configuration items are as follows:
- Dataset: Select the required order table
- Source Field: Select cost price
- Calculation Method: Select sum
- Data Format: Select currency
- Applicable Dimensions: Select as needed, recommended to select date, province
- Filter Conditions: To ensure metric data is valid and can guide future business strategies, configure the condition as cost price greater than 0 and inventory status not equal to 0
- Business Definition: Valid total cost amount
- Save to: Profit situation folder

Create the second metric "Total Sales Revenue". After filling in the information, click "Save". Configuration items are as follows:
- Dataset: Select the required order table
- Source Field: Select sales revenue
- Calculation Method: Select sum
- Data Format: Select currency
- Applicable Dimensions: Select as needed, recommended to select date, province
- Filter Conditions: To ensure metric data is valid and can guide future business strategies, configure the condition as cost price greater than 0 and inventory status not equal to 0
- Business Definition: Valid total sales amount
- Save to: Profit situation folder

Create Composite Metrics
Click "New Metric" in the "Metric Topics" module and select composite metric.

Create the third metric "Sales Gross Profit". After filling in the information, click "Save". Configuration items are as follows:
- Calculation Formula: Atomic metric sales revenue - atomic metric cost price
- Data Format: Select currency
- Applicable Dimensions: Inherited from source metrics, cannot be modified
- Business Definition: Sales gross profit = Sales revenue - Cost price
- Save to: Profit situation folder


Create Derived Metrics
In the "Metric Topics" module, click "New Metric" and select derived metric.

Create the third metric "Sales Gross Profit Year-over-Year". After filling in the information, click "Save". Configuration items are as follows:
- Derived From: Select metric Sales Gross Profit
- Applicable Dimensions: Inherited from source metrics, cannot be modified
- Time Dimension: Inherited from source metrics, cannot be modified
- Derivation Type: Year-over-Year/Period-over-Period
- Time Granularity: Year
- Default Current Period Time Range: This year
- Comparison Type: Year-over-Year/Period-over-Period - Year-over-Year
- Value Settings: Growth rate; Calculation method: (Current period data - Previous period data) / abs(Previous period data) * 100%
- Data Format: Percentage
- Business Definition: Sales gross profit year-over-year ratio
- Save to: Profit situation folder

Step 4: Create Metric Analysis Cards
Enter the "Metrics Analysis" module, create a new page and click "New Card" to create a metric analysis card.

Create the first metric analysis card, using table format to comprehensively display the data situation of total cost price, total sales revenue, and sales gross profit by province.
- Visualization Method: Select table
- Metrics: Select total cost price, total sales revenue, and sales gross profit
- Dimension Selection: Province

Create the second metric analysis card, using single line chart format to display Zhejiang Province's monthly profit trend.
- Visualization Method: Single line chart
- Metrics: Select sales gross profit
- Dimension Selection: Select date (month)
- Filter: Select province and select Zhejiang Province

Drag and layout the created cards in the dashboard. Subsequently, the cards can also be applied to mobile applications and large screens. The usage method is the same as other BI visualization analysis cards, which will not be expanded here.
