# prakashj46/excel-sales-analytics architecture

> Architecture diagram of the GitHub repository prakashj46/excel-sales-analytics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prakashj46/excel-sales-analytics
- Repository: https://github.com/prakashj46/excel-sales-analytics

## Overview

##### Project Type and Purpose
- This is a BI/analytics project rather than a traditional code‐intensive application.
- Its goal is to produce static PDF reports (Sales and Finance) by applying ETL, data modeling, and DAX calculations inside Excel/Power BI technology stack.

##### File Structure
- Top-level files are all PDF outputs plus a README.
- The absence of a “src” or “code” folder implies that the logic lives inside Excel workbooks (Power Query steps, Power Pivot model, DAX measures).
- No deployment or service directories; this is a purely client-side/report-generation pipeline.

##### README for Insights
- Sales Report: Customer Net Sales Performance, Market Net Sales Performance.
- Finance Report: P&L by Fiscal Year/Month/Markets.
- Technical skills: ETL with Power Query, data modeling (Power Pivot), DAX, date tables, fiscal hierarchies.

##### Main Components & Their Relationships
a. Data Sources
- Flat files or database extracts for sales, market targets, and finance transactions.
b. ETL Layer (Power Query)
- Extract raw data → Transform (clean, derive fiscal months, merge tables) → Load into Data Model.
c. Data Model (Power Pivot)
- Star schema: fact tables (Sales, Transactions) and dimension tables (Date, Market, Customer).
d. Calculation Layer (DAX)
- Measures: net sales, variance vs targets, P&L calculations, YOY growth.
e. Reporting Layer (Excel Pivot + Charts)
- PivotTables and chart objects bound to the Data Model.
- Templates for Customer Performance, Market Performance, P&L views.
f. Output Layer (PDF Generation)
- Export each sheet as a PDF using Excel’s “Export to PDF” or automated macro.

##### Architectural Patterns & Design Principles
- Layered BI architecture: Ingestion (ETL) → Modeling → Calculation → Presentation → Export.
- Star schema for high-performance pivots.
- Modular calculations: separate measures by domain (Sales vs Finance).

##### Essential Elements to Capture
- PDF documents as the final deliverables (list their names).
- User roles or consumers at the far right, e.g., “Business Analyst” or “Stakeholders.”

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Documentation
    Documentation["Documentation (README.md)"]:::doc

    %% BI Pipeline Layers
    DataSources["Data Sources\n(Sales, Market Targets, Finance Transactions)"]:::ingestion
    ETL["ETL (Power Query)"]:::ingestion
    DataModel["Data Model\nStar Schema:\nFact & Dimensions\n(Power Pivot)"]:::modeling
    DAX["Analytical Logic\n(DAX Measures)"]:::modeling
    Reporting["Reporting\n(PivotTables & Charts)"]:::presentation

    %% PDF Outputs
    subgraph "PDF Outputs"
        CustomerNetSales["Customer Net Sales Performance.pdf"] 
        MarketNetSales["Market Net Sales Performance.pdf"]
        PnLYear["P&L by FiscalYear.pdf"]
        PnLMarkets["P&L by Markets.pdf"]
        PnLMonth["P&L by Month.pdf"]
    end

    %% Stakeholders
    BA["Business Analyst / Stakeholders"]:::external

    %% Connections
    Documentation --> DataSources
    DataSources -->|"raw extracts"| ETL
    ETL -->|"cleaned tables"| DataModel
    DataModel -->|"processed model"| DAX
    DAX -->|"measures metadata"| Reporting
    Reporting -->|"pivot cache"| CustomerNetSales
    Reporting -->|"pivot cache"| MarketNetSales
    Reporting -->|"pivot cache"| PnLYear
    Reporting -->|"pivot cache"| PnLMarkets
    Reporting -->|"pivot cache"| PnLMonth
    CustomerNetSales --> BA
    MarketNetSales --> BA
    PnLYear --> BA
    PnLMarkets --> BA
    PnLMonth --> BA

    %% Click Events
    click Documentation "https://github.com/prakashj46/excel-sales-analytics/blob/main/README.md"
    click CustomerNetSales "https://github.com/prakashj46/excel-sales-analytics/blob/main/Customer Net Sales Performance.pdf"
    click MarketNetSales "https://github.com/prakashj46/excel-sales-analytics/blob/main/Market Net Sales Performance.pdf"
    click PnLYear "https://github.com/prakashj46/excel-sales-analytics/blob/main/P&L by FiscalYear.pdf"
    click PnLMarkets "https://github.com/prakashj46/excel-sales-analytics/blob/main/P&L by Markets.pdf"
    click PnLMonth "https://github.com/prakashj46/excel-sales-analytics/blob/main/P&L by Month.pdf"

    %% Styles
    classDef ingestion fill:#AED6F1,stroke:#2980B9,color:#1B2631;
    classDef modeling fill:#A9DFBF,stroke:#27AE60,color:#1B2631;
    classDef presentation fill:#F5B041,stroke:#CA6F1E,color:#1B2631;
    classDef external fill:#D7DBDD,stroke:#7F8C8D,color:#1B2631;
    classDef doc fill:#F8C471,stroke:#D68910,color:#1B2631;
```
