Skip to content

Power-BI-Data-Analysis offers an interactive Power BI dashboard with 2022–2023 retail sales data, showing trends in products, stores, and customer behavior πŸ™.

Notifications You must be signed in to change notification settings

sparsh771/Power-BI-Data-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 

Repository files navigation

https://github.com/sparsh771/Power-BI-Data-Analysis/releases

Retail Power BI Dashboard: 2020-2023 Insights & Trends

Releases

This repository holds an interactive Power BI dashboard built with retail sales data from January 2020 through December 2023. The dashboard reveals how sales perform across time, product categories, stores, and customer segments. It helps users spot trends, compare stores, and understand buyer behavior. It is designed for analysts, data managers, and decision makers who work with retail data and financial metrics.

Table of contents

  • What you will find
  • How the project is organized
  • Data sources and scope
  • Data model and architecture
  • Key measures and DAX expressions
  • Time intelligence and forecasting
  • Visual design and interactivity
  • Getting started
  • Data loading and transformation
  • Data quality, governance, and security
  • Performance and optimization
  • Deployment, sharing, and maintenance
  • Releases and download guidance
  • How to contribute
  • Roadmap
  • Frequently asked questions
  • Data dictionary
  • Screenshots and gallery
  • License and attribution

What you will find

  • A ready-to-use Power BI workbook that explores retail sales from 2020 to 2023.
  • A star schema data model with fact and dimension tables for clean analytics.
  • DAX measures for total sales, gross profit, margin, discounts, quantity shipped, and more.
  • Time-series analysis, seasonality checks, and demand forecasting using built-in time intelligence.
  • Interactive visuals that support store-level comparisons, product category performance, and customer purchasing patterns.
  • Clear guidance to load, transform, and validate data in Power Query Editor.

How the project is organized

  • data/
    • Raw data sources, sample CSVs for demonstrations, and metadata.
  • model/
    • The data model diagram, table descriptions, and relationships between facts and dimensions.
  • measures/
    • A collection of DAX expressions for key metrics.
  • visuals/
    • Guidance on visuals used, interactions, bookmarks, and storytelling layouts.
  • docs/
    • Tutorials, validation steps, QA notes, and release notes.
  • scripts/
    • Optional data preparation scripts to reproduce parts of the dataset.
  • assets/
    • Images, logos, and visual assets used in the README and dashboards.

Data sources and scope

  • Timeframe: 2020-01-01 to 2023-12-31.
  • Geography: Multiple stores across regions with store-level data.
  • Entities:
    • Sales facts including order ID, date, store, product, customer, quantity, and revenue.
    • Product dimension with category, subcategory, brand, size, and color attributes.
    • Store dimension with location, region, store type, and opening date.
    • Date dimension with standard time attributes like year, quarter, month, week, and day.
    • Customer dimension with customer segment, loyalty status, and demographic signals.
  • Metrics include revenue, cost of goods sold, gross profit, gross margin, discounts, net sales, units sold, and return rate.
  • Data quality: Data is validated for key constraints, such as non-negative quantities, valid dates, and consistent product IDs across tables. Missing values are flagged, and simple imputation strategies are documented in the data quality section.

Data model and architecture

  • Approach: Star schema for fast querying and straightforward maintenance.
  • Core tables:
    • FactSales: captures line-level transactions and financials.
    • DimDate: provides consistent time attributes for time-based analysis.
    • DimStore: stores metadata for each location.
    • DimProduct: holds product attributes and category hierarchies.
    • DimCustomer: lists customer attributes and segments.
  • Relationships:
    • FactSales to DimDate on order_date_id.
    • FactSales to DimStore on store_id.
    • FactSales to DimProduct on product_id.
    • FactSales to DimCustomer on customer_id.
  • Data lineage: Every measure is traceable to the underlying fact data. The model supports advanced time intelligence while preserving accuracy across filters and slicers.
  • Modularity: The model is designed for incremental refresh and easy extension. Adding new markets, product lines, or additional facts remains straightforward.

Key measures and DAX expressions

  • Total Revenue: SUM(FactSales[Revenue])
  • Total Cost: SUM(FactSales[COGS])
  • Gross Profit: [Total Revenue] - [Total Cost]
  • Gross Margin: DIVIDE([Gross Profit], [Total Revenue], 0)
  • Units Sold: SUM(FactSales[Quantity])
  • Average Order Value (AOV): DIVIDE([Total Revenue], DISTINCTCOUNT(FactSales[OrderID]))
  • Customer Count: DISTINCTCOUNT(FactSales[CustomerID])
  • Discount Amount: SUM(FactSales[DiscountAmount])
  • Net Revenue: [Total Revenue] - [Discount Amount]
  • Revenue Growth YoY: CALCULATE([Total Revenue], SAMEPERIODLASTYEAR(DimDate[Date]))
  • Moving Averages: AVERAGEX(CALCULATE(DISTINCT(DimDate[Date])), [Revenue])
  • Time-Intelligence helpers:
    • Period-to-date: TOTALYTD([Total Revenue], DimDate[Date])
    • Quarter-to-date: TOTALQTD([Total Revenue], DimDate[Date])
    • Month-to-date: TOTALMTD([Total Revenue], DimDate[Date])
  • Forecasting insertions (time-series):
    • Uses built-in forecasting in Power BI visuals with the date axis and simple trend-based projection. Forecast horizon and confidence bands are configurable per visual.

Time intelligence and forecasting

  • Time intelligence: The model treats time as a primary axis for analytics. Power BI’s time-intelligence functions drive KPI calculations and trend analyses.
  • Forecasting approach: A practical forecast leverages built-in Power BI forecasting on the time axis. It supports a forecast horizon from 2 to 24 periods, with confidence intervals. The forecast assumes a stable trend but can adapt to seasonal patterns where present in the data.
  • Seasonality and cycles: The dashboard allows testing for seasonality by month and quarter. You can decompose seasonality visually and compare year-over-year patterns to identify recurring peaks in holiday periods, promotions, and regional events.
  • Forecast validation: Visuals include a forecast with confidence bands. Analysts can adjust the horizon and review historical residuals to understand forecasting accuracy.
  • Best practices: For credible forecasts, ensure data completeness for the required periods, maintain a stable data schema, and align your date table with the fiscal calendar if used. Avoid overfitting by keeping the horizon reasonable relative to historical data.

Visual design and interactivity

  • Visual toolkit:
    • Time-series line charts showing revenue, units, and gross profit across weeks and months.
    • Stacked and clustered bar charts for category performance and store comparisons.
    • Treemaps showing category contributions to revenue and profit.
    • KPI cards for quick health checks like YoY growth, margin, and AOV.
    • Heat maps for store performance by region and month.
    • Slicers for date ranges, store regions, product categories, and customer segments.
    • Drill-through pages for deep dives into product families or top customers.
  • Interactivity:
    • Cross-filtering between visuals ensures a cohesive exploration experience.
    • Highlighting and tooltips provide context for each data point.
    • Bookmarks enable storytelling to present a sequence of insights.
  • Accessibility:
    • Color palettes are chosen to support color-vision-deficiency accessibility.
    • Descriptive tooltips explain metrics and how to interpret visuals.
  • Storytelling flow:
    • Start with global performance, then drill into growth patterns, product category dynamics, and store-level insights.
    • Highlight key drivers of revenue and margins, followed by customer behavior trends.
    • End with actionable recommendations and forecasted outlooks.

Getting started

  • Prerequisites:
    • A modern Windows machine with Power BI Desktop installed (or access to Power BI Service for publishing).
    • A basic understanding of Power BI concepts: relationships, measures, and visuals.
  • Quick start steps:
    1. Clone the repository locally or download the package from the Releases page.
    2. Open Power BI Desktop.
    3. Use the provided dataset or connect to your own data sources following the data model described in this README.
  1. Refresh data to load the latest figures and ensure the date table aligns with your data.
  2. Navigate to the Visuals pane and explore the pre-built dashboards.
  • Data refresh:
    • If you maintain a live data source, configure a scheduled refresh in Power BI Service for ongoing insights.
    • For local files, set up a refresh plan to maintain up-to-date numbers after any data changes.

Data loading and transformation

  • Power Query Editor workflow:
    • Import data from CSV, Excel, or database sources that match the schema.
    • Cleanse data: trim strings, standardize date formats, and remove duplicates.
    • Create a single date table that aligns with the fact data.
    • Establish relationships in the data model to connect facts with dimensions.
    • Create calculated columns for derived attributes (e.g., month name, quarter).
  • Data validation steps:
    • Verify that all date fields map to the date table.
    • Ensure product IDs and store IDs exist in their respective dimension tables.
    • Check consistency between revenue, COGS, and discount fields.
  • Reusable templates:
    • The Power Query steps are designed to be portable. You can adapt the same transformation logic to new datasets with similar structures.

Data quality, governance, and security

  • Data quality:
    • The pipeline marks missing values in critical fields and logs anomalies.
    • Key constraints ensure non-negative amounts and valid dates.
    • Regular checks catch mismatches between the fact and dimension tables.
  • Governance:
    • The model uses role-based access for sensitive fields in the Power BI Service.
    • Data lineage is documented in the docs/ section to aid audit and compliance.
  • Security:
    • Use row-level security to restrict data by region or store if needed.
    • Limit sharing of the report to intended audiences and implement workspace governance in Power BI Service.

Performance and optimization

  • Model design:
    • A star schema minimizes complex joins and improves performance in large datasets.
    • Measures are optimized with explicit aggregation and avoidance of heavy CALCULATE nests where possible.
  • Visual performance:
    • Large tables are summarized in the visuals, with drill-through options for details.
    • Filters and slicers are applied at the report level to limit data loaded into visuals.
  • Refresh performance:
    • Incremental refresh can be configured for large datasets.
    • Date table partitioning helps manage historical data efficiently.
  • Troubleshooting tips:
    • If visuals lag, check the data model relationships and ensure no circular filters.
    • When measures return blank values, verify the presence of data in the corresponding tables and the correctness of relationships.

Deployment, sharing, and maintenance

  • Deployment flow:
    • Prepare the Power BI report locally.
    • Publish to Power BI Service for sharing with stakeholders.
    • Create a dashboard in the service that pin dashboards from the report, if needed.
  • Sharing:
    • Grant access to teammates via workspace roles.
    • Use apps to share a curated view of the dashboard with a broader audience.
  • Maintenance:
    • Schedule regular data refreshes to keep metrics current.
    • Monitor data quality signals and fix schema drift quickly.
    • Update the date dimension if the data scope changes (e.g., a new year or new holiday alignment).
  • Documentation:
    • Maintain a changelog detailing data source changes, model updates, and metric updates.
    • Update the data dictionary to reflect new fields or renamed columns.
  • Local and cloud workflows:
    • The repository supports both local experimentation and cloud deployment.
    • Use the Releases page to share updated workbook versions with the team.

Releases and download guidance

  • The project provides a Releases page that hosts the pre-built Power BI workbook and related assets.
  • From the Releases page, download the latest asset file named Power_BI_Data_Analysis_Retail_2023.pbix and open it in Power BI Desktop.
  • If you encounter issues with the link, visit the Releases section of the repository for alternate download options or updated assets.
  • The link to the Releases page is a path-based URL, so you should download and execute the provided workbook file to reproduce the analysis locally.
  • Direct link reminder:

How to contribute

  • Goals:
    • Improve data quality and model accuracy.
    • Extend the dashboard with new metrics or store-level insights.
    • Add data sources or support for additional markets.
  • What you can contribute:
    • Bug fixes and performance improvements.
    • New DAX measures for business scenarios.
    • Documentation updates for data sources and governance.
    • UI enhancements for readability and accessibility.
  • Guidelines:
    • Open pull requests with a clear scope and tests or reproducible steps.
    • Use descriptive commit messages.
    • Include samples or screenshots where relevant to illustrate changes.
    • Adhere to the project’s coding and documentation conventions.
  • Areas to start:
    • Review the data model and ensure new data sources align with the Dim and Fact tables.
    • Add a new time period or region and verify the forecast remains stable.
    • Improve the data dictionary with new fields discovered in the data feed.

Roadmap

  • Short-term goals:
    • Refine the date table to support fiscal calendars as needed.
    • Improve data quality checks and add automated validation scripts.
    • Enhance the forecasting experience with parameterized horizons.
  • Mid-term goals:
    • Extend the model to include promotional events and marketing spend as a separate fact.
    • Add customer segmentation analytics with propensity scores and lifecycle metrics.
    • Implement broader role-based access controls and data governance workflows.
  • Long-term goals:
    • Build an end-to-end analytics platform that covers pricing optimization, inventory planning, and replenishment signals.
    • Integrate external data like weather or macro indicators to enrich forecasts.
    • Create a robust set of templates for different retail formats and retailer profiles.

Frequently asked questions

  • What data can I use with this repository?
    • You can use retail sales data with the same structure as described in the data model. The dataset should include dates, store IDs, product IDs, quantities, and revenue.
  • Do I need Power BI Service to run this dashboard?
    • No. You can run the workbook locally with Power BI Desktop. Publish to Power BI Service if you want to share insights with a team.
  • How do I update the data sources?
    • Update the CSV or database connections in Power Query Editor. Ensure the data schema matches the model. Refresh the dataset and confirm all relationships remain valid.
  • Can I customize the visuals?
    • Yes. The dashboards are built with standard visuals. You can replace visuals, adjust interactivity, or add new visuals as needed.
  • How do I validate forecasts?
    • Compare forecasted values against actuals for historical periods and inspect the confidence bands. Look for consistent patterns and assess residuals.

Data dictionary

  • FactSales:
    • order_id: Unique identifier for each order.
    • order_date_id: Foreign key to DimDate.
    • store_id: Foreign key to DimStore.
    • product_id: Foreign key to DimProduct.
    • customer_id: Foreign key to DimCustomer.
    • Revenue: Total revenue for the line item.
    • COGS: Cost of goods sold for the line item.
    • DiscountAmount: Discounts applied to the line item.
    • Quantity: Units sold.
  • DimDate:
    • Date: The actual date.
    • Year, Quarter, Month, Week, Day: Time attributes.
    • IsHoliday: Flag for holiday periods.
  • DimStore:
    • store_id: Unique store identifier.
    • StoreName, Region, StoreType: Descriptive attributes.
    • OpeningDate: When the store started operations.
  • DimProduct:
    • product_id: Unique product identifier.
    • Category, SubCategory, Brand, Size, Color: Product attributes.
  • DimCustomer:
    • customer_id: Unique customer identifier.
    • Segment, LoyaltyStatus, AgeGroup: Customer attributes.

Screenshots and gallery

  • Visuals preview:
    • A global revenue trend line with YoY comparison.
    • Category performance bars showing top contributors.
    • Store heat map by region and month.
    • Customer segment insights with RFM-style visuals.
  • Gallery assets:
    • Images illustrating the dashboard layout, color schemes, and layout for storytelling.
    • Logos for branding and identity in the README.

License

  • This project is licensed under the MIT License.
  • You may use, modify, and distribute the repository content, provided you include the license and attribution as required.

Appendix: practical tips for analysts

  • Start with a clean date model:
    • Ensure a complete date table with all required attributes.
    • Create relationships to the fact table using the date key to enable time-based analysis.
  • Build modular visuals:
    • Use slicers to drill across time, region, product category, and customer segment.
    • Save scenes with bookmarks to present a narrative flow.
  • Monitor data health:
    • Track data quality indicators and set up a simple alerting mechanism in Power BI Service to highlight anomalies.
  • Scale incrementally:
    • If you add new data sources, test in a separate workspace before integrating into the main model.
  • Document decisions:
    • Record assumptions, especially around forecasting horizons, seasonality, and data cleaning steps.

End of documentation

  • You can explore the data, adjust measures, and craft your own stories from the dashboard.
  • The Releases page provides the official workbook you can download and run locally to reproduce the analytics.

Images

  • Power BI logo: Power BI Logo
  • Dashboard illustration: Dashboard Illustration

Notes for readers

  • The repository is designed for practical analytics work with retail data.
  • It emphasizes clear data governance, robust DAX measures, and a scalable data model.
  • Use the Releases page to obtain the workbook and reproduce the dashboard locally.

Explore, analyze, and translate data into actionable business insights.

About

Power-BI-Data-Analysis offers an interactive Power BI dashboard with 2022–2023 retail sales data, showing trends in products, stores, and customer behavior πŸ™.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •