Create a Sales Analysis Dashboard
Visualize sales data using a Data Store as the primary input source.
Purpose
This guide explains how to create a Sales Analysis Dashboard on the BDB Platform using an existing ClickHouse Data Store as the data source. It walks through the process of creating SQL-based datasets, configuring visual components such as Pie Chart, Bar Chart, and Time Series Chart, and applying in-depth property customization for professional visualization.
Business Context
This workflow enables business users and analysts to visualize sales metrics such as total revenue, profit, and regional trends over time. By connecting directly to a ClickHouse Data Store, users can leverage real-time data without external files, ensuring accuracy and freshness for decision-making.
Key Highlights
Category
Description
Goal
Build a time-based Sales Analysis Dashboard using ClickHouse Data Store datasets.
Data Source
ClickHouse Connector with published datasets.
Primary Components
Pie Chart, Bar Chart, and Time Series Chart.
SQL Logic
Separate datasets for item-wise profit and yearly time-series trends.
Customization Focus
Background colors, title box color, font customization, and axis formatting.
Outcome
A fully interactive dashboard providing visual insights into item performance and regional revenue trends.
Workflow Overview
Step
Module
Activity
1
Data Center
Create ClickHouse connector and SQL-based datasets.
2
Data Center
Publish datasets for use in Designer.
3
Dashboard Designer
Create and configure dashboard layout.
4
Dashboard Designer
Map datasets to charts, customize visuals, and preview dashboard.
Step 1 – Create a ClickHouse Data Connector
From the App Menu, open Data Center.
Click Create (+) to create a new connector.
Select ClickHouse Data Connector.
Provide the following configuration details:
Field
Description
Connector Name
Sales_Data_Store_ConnectorUsername / Password
As provided by your database admin
Host (IP)
Enter ClickHouse server address
TCP Port
Default: 8123
Database Name
Target schema containing your sales data
Click Save to complete the connector setup.
Step 2 – Create and Publish Datasets
2.1 Create Time Series Dataset
In the Data Center, locate the connector → click the three dots ⋮ → Create Dataset.
Provide a dataset name: Time_Series_Data.
Paste and validate the following SQL query:
SELECT
Region,
toYear(toDate(OrderDate)) AS OrderYear,
SUM(TotalRevenue) AS TotalRevenue,
SUM(TotalProfit) AS TotalProfit
FROM sales_world_training_data
GROUP BY Region, OrderYear
ORDER BY OrderYear, Region;Validate the query and review the output.
Click Save, then Publish to make it available for the Designer.
2.2 Create Bar Chart Dataset
From the same connector, click ⋮ → Create Dataset again.
Provide a dataset name: Bar_Chart_Data.
Paste the SQL query below:
SELECT
ItemType,
SUM(TotalProfit) AS Total_Profit
FROM sales_world_training_data
GROUP BY ItemType
ORDER BY Total_Profit DESC;Validate → Save → Publish.
Step 3 – Create and Configure the Dashboard
3.1 Launch the Dashboard Designer
From the App Menu, open Dashboard Designer.
Click New (+) → Dashboard.
Provide a name, such as Sales Analysis Dashboard.
Select workspace → click Save.
3.2 Configure Dashboard Properties
Right-click on the dashboard background → Properties.
Under Background, click More Colors → choose a color theme (e.g., light gray or blue gradient).
Adjust the dashboard’s Width and Height in Properties → Size.
Save the configuration.
Step 4 – Add and Customize Components
4.1 Box Component (Header Container)
Drag a Box from the Components Library.
Adjust its size and position using the General tab.
Change its background color (e.g., gradient blue) under Style → Gradient.
4.2 Label Component (Dashboard Title)
Drag a Label into the header Box.
Update text →
Sales Analysis Dashboard.Adjust font size (24 pt), font weight (Bold), alignment (Center), and color (White).
Save changes.
4.3 Pie Chart Component
Drag and drop the Pie Chart onto the canvas.
In Properties → General, adjust Left, Top, Height, and Width.
Under Background, choose a contrasting color.
Update Title →
Profit Distribution by Item Type.Uncheck Show Dataset Description.
Modify Title Box Color, Font Color, and Font Size.
Under Formatter, select Percentage for units.
Sample Mapping:
Category → ItemType
Series → Total_Profit
Optional Script:
sdk.applyAggregation("pie_chart", "ItemType", "Total_Profit", "SUM");4.4 Bar Chart Component
Drag and drop a Bar Chart from the Components Library.
Adjust dimensions to align below or beside Pie Chart.
Change background color via Style → Gradient.
Add Title →
Total Profit by Item Type.Uncheck Show Dataset Description.
Update Title Box Color and Font Color as desired.
Set X-Axis Description →
Item Type.Set Y-Axis Description →
Total Profit (USD).
Sample Mapping:
Category → ItemType
Series → Total_Profit
Optional Script:
sdk.applyAggregation("bar_chart", "ItemType", "Total_Profit", "SUM");4.5 Time Series Chart Component
Drag and drop a Time Series Chart.
Adjust Left, Top, Height, and Width to align with the other charts.
Set Background Color → Gradient Blue or Gray.
Update Title →
Revenue and Profit Trends Over Time.Modify Title Box Color, Font Color, and Size.
Under Axis Settings:
X-Axis Description →
Year.Y-Axis Description →
Revenue / Profit (USD).Enable Show Axis Label (Second Axis) and set Formatter →
Auto.
Adjust axis font colors and sizes for better visibility.
Sample Mapping:
Category → OrderYear
Series → TotalRevenue, TotalProfit
Group → Region
Step 5 – Add Connections
5.1 Add Data Service Connections
Click the Plug (Connector) icon → Add Data Service.
Select your existing ClickHouse Data Connector.
Choose the published datasets:
Bar_Chart_Conn
Bar_Chart_Data
Bar Chart
Time_Series_Conn
Time_Series_Data
Time Series Chart
Pie_Chart_Conn
Bar_Chart_Data (or custom)
Pie Chart
Save each connection after mapping.
Step 6 – Map Datasets to Chart Fields
Chart
Category
Series
Group (Optional)
Pie Chart
ItemType
Total_Profit
—
Bar Chart
ItemType
Total_Profit
—
Time Series
OrderYear
TotalRevenue, TotalProfit
Region
Additional Formatting:
Assign custom colors to series.
Set data label rotation (45° for Bar Chart).
Update axis tick marks and value labels.
Step 7 – Preview and Validate
Click Preview Dashboard.
Verify:
Pie Chart shows profit distribution.
Bar Chart displays the top Item Types by Profit.
Time Series Chart plots Revenue and Profit over Years and Regions.
Adjust any axis titles or color schemes for better readability.
Save the dashboard.
Step 8 – Publish the Dashboard
Click Save → Publish.
Select the workspace and assign user roles.
Confirm publish action.
The dashboard will be available under the Home Page.

Outcome
Best Practices
Use descriptive names for datasets and connections (
Time_Series_Data,Bar_Chart_Data).Validate queries before publishing to prevent load errors.
Align font and color themes for consistent UI aesthetics.
Limit categories in Bar/Pie charts to improve readability.
Preview frequently during layout changes.
Business Value
This dashboard provides a consolidated view of global sales performance — helping organizations to:
Compare regional revenues and profits over time.
Identify top product categories by profitability.
Leverage data from a centralized ClickHouse Data Store for real-time decision making.
Enable executives and analysts to monitor KPIs visually without manual report creation.