# Create a Report based on multiple Data Store

### **Purpose**

This workflow explains how to create a **Self-Service Report** on the **BDB Platform** using **Retail Store Purchase and Sales Data**.\
It demonstrates how to use the **Data Sandbox**, build **Datastores**, and visualize insights in the **Report Module** using standard KPIs, charts, and Machine Learning (ML) capabilities such as **Customer Segmentation**, **Anomaly Detection**, and **Time Series Forecasting**.

### **Business Context**

Retail organizations often deal with large amounts of purchase and sales data that require real-time insights to optimize procurement, pricing, and customer engagement strategies.\
This workflow empowers business analysts to:

* Visualize **Procurement Trends** through KPI-driven dashboards.
* Identify **Top Performing Brands and Products**.
* Monitor **Sales Patterns** and **Category Performance**.
* Leverage **Machine Learning (ML)** tasks for forecasting, segmentation, and anomaly detection — all within a single self-service reporting environment.

### **Key Highlights**

<table data-header-hidden><thead><tr><th width="143.77783203125"></th><th></th></tr></thead><tbody><tr><td><strong>Category</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>Goal</strong></td><td>Build a comprehensive Self-Service Report for retail purchase, sales, and insights.</td></tr><tr><td><strong>Data Source</strong></td><td>Retail Store Purchase and Sales Data uploaded to the Data Sandbox.</td></tr><tr><td><strong>Modules Used</strong></td><td>Data Center and Report modules.</td></tr><tr><td><strong>Key Features</strong></td><td>KPIs, interactive charts, ML View (Segmentation, Time Series, Anomaly Detection).</td></tr><tr><td><strong>Outcome</strong></td><td>A fully interactive, analytics-driven reporting workspace with intelligent forecasting.</td></tr></tbody></table>

### **Workflow Overview**

<table data-header-hidden><thead><tr><th width="65.888916015625"></th><th width="165.88885498046875"></th><th></th></tr></thead><tbody><tr><td><strong>Step</strong></td><td><strong>Module</strong></td><td><strong>Description</strong></td></tr><tr><td>1</td><td>Data Center</td><td>Upload Retail Purchase and Sales data to the Data Sandbox.</td></tr><tr><td>2</td><td>Data Center</td><td>Create Datastores for Purchase and Sales data.</td></tr><tr><td>3</td><td>Report Module</td><td>Create a Self-Service Report for Purchase data.</td></tr><tr><td>4</td><td>Report Module</td><td>Create a Self-Service Report for Sales data.</td></tr><tr><td>5</td><td>Report Module</td><td>Explore Machine Learning (ML) features for deeper insights.</td></tr></tbody></table>

### **Step 1 – Upload Data to the Data Sandbox**

1. Navigate to the **App Menu → Data Center**.
2. Click **Create (+)** → select **Data Sandbox**.
3. Provide the following details:
   * **Sandbox Name:** *Retail\_Store\_Data*
   * **Description:** *Contains retail store purchase and sales records*
4. Upload your Excel or CSV files:
   * *Retail\_Store\_Purchase\_Data.xlsx*
   * *Retail\_Store\_Sales\_Data.xlsx*
5. Click **Upload** to complete.
6. Once uploaded, both datasets will appear in the Sandbox list.

### **Step 2 – Create Datastores for Purchase and Sales Data**

1. In the **Data Center**, click the **three dots (⋮)** beside the Retail Sandbox.
2. Select **Create Data Store**.
3. Create two separate Datastores:
   * **Retail\_Purchase\_Store**
   * **Retail\_Sales\_Store**
4. Verify that both Datastores are active and available under the Data Store list.

* [x] **Result:** Two Datastores are now available for report creation — one for purchases, one for sales.

### **Step 3 – Create a Self-Service Report for Purchase Data**

1. Navigate to the **App Menu → Report Module**.
2. Click **Create Report**.
3. Provide:
   * **Report Name:** *Product Procurement Overview*
   * **Description:** *(Optional) A report visualizing procurement trends and top-purchased products.*
4. Select **Existing Data Store** as the data source.
5. Choose the **Retail\_Purchase\_Store** and click **Create Report**.

#### **3.1 Create KPI Tiles**

1. Search for **Purchase Amount** and plot a KPI tile showing the **Total Purchase Amount**.
2. Search for **Quantities** and plot a KPI tile showing the **Total Quantity Purchased**.
3. Use **Chart Properties** to adjust:
   * Color Theme (e.g., gradient green or blue)
   * Font Size and KPI Format (e.g., Currency, Numeric).
4. Save the KPI tiles.

#### **3.2 Create Brand and Product Insights Charts**

1. Search for **Brand Name** and **Purchase Amount**.
   * Create a **Bar Chart** showing the **Most Preferred Brand** by purchase amount.
   * Customize chart colors and label rotation under **Chart Properties**.
2. Search for **Product Name** and **Purchase Amount**.
   * Create a **Column Chart** showing **Top Purchased Products**.
   * Apply data sorting to show products in descending order of purchase value.
3. Add more KPIs as needed, such as:
   * Average Purchase Value
   * Total Unique Products Purchased.
4. Once complete, save the report as **“Product Procurement Overview.”**

### **Step 4 – Create a Self-Service Report for Sales Data**

1. In the **Report Module**, click **Create Report** again.
2. Provide:
   * **Report Name:** *Product Sale Overview*
   * **Description:** *(Optional) Visualizing sales trends and category performance.*
3. Select **Existing Data Store → Retail\_Sales\_Store**.
4. Click **Create Report.**

#### **4.1 Create Sales KPIs**

1. Search for **Billing Date** and **Net Sale Value**.
   * Plot a KPI tile showing the **Net Value of Goods Sold**.
2. Search for **Billing Date** and **Quantities**.
   * Plot a KPI tile showing the **Total Quantities Sold**

#### **4.2 Create Category Analysis Charts**

1. Search for **Product Categories** and **Net Sale Value**.
   * Plot a **Bar Chart** titled **“Most Valued Categories.”**
   * Use **Charting Properties → Sort → Descending** to show top performers.
2. Create another chart using the same fields.
   * Change **Sort → Ascending** and title it **“Least Valued Categories.”**
3. Apply consistent visual themes and axis formatting across all charts.
4. Save the completed report as **“Product Sale Overview.”**

### **Step 5 – Create the ML View for Insights**

The **Machine Learning (ML) View** enables users to apply predictive analytics directly within the report — without writing code.\
It supports four ML tasks:

* **Customer Segmentation**
* **Anomaly Detection**
* **Time Series Analysis**
* **Sentiment Analysis**

#### **5.1 Customer Segmentation**

1. Search for the following fields:
   * **City**, **Net Sale Value**, **Basic Cost**, **Tax Amount**, **Discount**.
2. Click the **ML Tab → Customer Segmentation** task.
3. Configure parameters:
   * **Feature Columns:** Select all the fields listed above.
   * **Cluster Count:** *3* (or as per requirement).
   * **Operator:** *K-Means Clustering*.
4. Click **Predict** to visualize customer segments.

* [x] **Result:** The chart groups customers into clusters based on purchase patterns.

#### **5.2 Time Series Forecasting**

1. Search for **Billing Date** and **Net Sale Value**.
2. Create a chart visualizing sales trends over time.
3. Click **ML Tab → Time Series Analysis**.
4. Configure:
   * **Feature Column:** *Net Sale Value*
   * **Prediction Count:** *10 (Next 10 Days)*
5. Click **Predict.**

* [x] **Result:** The model forecasts sales for the next 10 days based on historical data.

#### **5.3 Anomaly Detection**

1. Search for **Store List** and **Quantities**.
2. Create a chart displaying quantity distribution per store.
3. Click **ML Tab → Anomaly Detection.**
4. Configure:
   * **Feature Column:** *Quantities*
   * **Store Filter:** *Wonders*
5. Click **Predict.**

* [x] **Result:** The system highlights stores with abnormally high quantities as anomalies.

#### **5.4 Sentiment Analysis (Optional)**

1. Upload a **Customer Review Dataset** (if available).
2. Select **Review Text** as the feature column.
3. Run **Sentiment Analysis** under the ML tab.
4. Review polarity outputs (*Positive*, *Neutral*, *Negative*) as insights.

### **Step 6 – Finalize and Save the Insights Report**

1. Review all KPIs, charts, and ML results.
2. Click **Theme Settings** and apply a visual theme for branding consistency (e.g., Retail Blue or Dark Mode).
3. Provide:
   * **Final Report Name:** *Retail Insights Dashboard*
   * **Description:** *(Optional) Integrated overview of Purchase, Sales, and ML insights.*
4. Click **Save Report.**

* [x] **Final Output:** Three separate but linked reports:
  * Product Procurement Overview
  * Product Sale Overview
  * Retail Insights (ML View)

### **Outcome**

* [x] Two self-service reports created using **Retail Purchase and Sales Datastores**.
* [x] Insights visualized through **KPI Tiles, Bar, and Column Charts**.
* [x] Advanced analytics achieved using **ML View (Segmentation, Forecasting, Anomaly Detection)**.
* [x] Unified **Retail Insights Dashboard** enabling data-driven decision-making.

### **Best Practices**

* Use **consistent column names** across purchase and sales data.
* Regularly update **Sandbox data** to reflect recent transactions.
* For forecasting, ensure at least **30 days of historical data**.
* Save **custom chart views** for reuse across reports.
* Apply **color-coded themes** for better visual distinction (e.g., blue for sales, green for purchase).
* Validate all KPI metrics before publishing reports.

### **Business Value**

This workflow helps retail teams:

* Monitor **procurement and sales KPIs** in one consolidated view.
* Predict **future sales** and detect operational anomalies.
* Segment customers for **targeted marketing and loyalty programs**.
* Enable **self-service analytics** without technical dependencies.
* Enhance operational agility with real-time data insights.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bdb.ai/bdb-user-documentation/platform-modules/10.0/how-to-guides-and-tutorials/self-service-report/create-a-report-based-on-multiple-data-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
