File size: 3,169 Bytes
4a28201
ac21c20
 
e3b63ba
ac21c20
e3b63ba
ac21c20
e3b63ba
225dc90
ac21c20
4a28201
ac21c20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
title: SAP Sales KPI Dashboard
emoji: πŸ“Š
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.1
app_file: app.py
pinned: false
license: mit
---

# SAP Sales KPI Dashboard

## Overview
A comprehensive Streamlit dashboard analyzing real SAP ERP data from Kaggle, focusing on sales performance KPIs.

## Data Source
- **Dataset**: [mustafakeser4/sap-dataset-bigquery-dataset](https://www.kaggle.com/datasets/mustafakeser4/sap-dataset-bigquery-dataset)
- **Tables Used**: VBAK, VBAP, KNA1, VBRK, VBRP, MAKT, and supporting tables
- **Records**: Thousands of real SAP transactions

## Key Features

### 🎯 Sales KPIs
- **Customer Analysis**: Top 10 customers by revenue with customer concentration metrics
- **Regional Performance**: Country-wise sales breakdown and geographic insights  
- **Sales Organizations**: Performance by SAP sales organization and distribution channels
- **Product Analysis**: Top 10 products by revenue with material descriptions

### πŸ“Š Analytics Modules

#### πŸ‘₯ Customer Analysis
- Revenue ranking of top customers
- Customer concentration analysis
- Customer master data integration (KNA1)

#### 🌍 Regional Performance
- Country-wise revenue distribution
- Geographic performance insights
- Regional market analysis

#### πŸ“ˆ Sales Organization Analysis
- Sales organization (VKORG) performance
- Distribution channel (VTWEG) effectiveness
- Organizational structure insights

#### πŸ›οΈ Product Performance
- Top-performing materials by revenue
- Product descriptions from MAKT table
- Material master data integration

#### πŸ“Š Data Quality Overview
- Dataset completeness metrics
- Revenue distribution analysis
- Sample data exploration

## Technical Implementation

### Data Processing
- **Real-time Kaggle Integration**: Uses kagglehub to download latest dataset
- **SAP Table Joins**: Combines VBAK (sales orders) with VBAP (line items)
- **Master Data Integration**: Enriches with customer (KNA1) and material (MAKT) data
- **Data Quality Handling**: Manages missing values and data type conversions

### Performance Optimization
- **Selective Loading**: Loads only essential columns and limits record count
- **Caching**: Streamlit caching for improved performance
- **Error Handling**: Graceful degradation when tables are unavailable

## SAP Tables Used

| Table | Description | Usage |
|-------|-------------|-------|
| VBAK | Sales Document Header | Main sales orders |
| VBAP | Sales Document Items | Line item details |
| KNA1 | Customer Master | Customer information |
| MAKT | Material Descriptions | Product names |
| VBRK | Billing Header | Invoice data |
| VBRP | Billing Items | Invoice line items |

## Interactive Features
- **Organization Filtering**: Focus on specific sales organizations
- **Real-time Calculations**: Dynamic KPI updates based on filters
- **Export Capabilities**: Download processed data as CSV
- **Responsive Design**: Optimized for various screen sizes

## Deployment
Deployed on Hugging Face Spaces with automatic Kaggle dataset synchronization.

Perfect for SAP analysts, sales managers, and business intelligence teams needing quick insights from real ERP data.