Build a Power BI sales dashboard with free sample data
A practical, end-to-end walkthrough — from a realistic sample sales file to a working Power BI report with revenue, margin and growth measures. About 45 minutes.
Get the dataset
This tutorial uses realistic B2B sales data — invoice line items with customers, products, categories, quantities, prices, costs and margins. It's correlated (segment-driven buying, real price/margin relationships), so your charts will actually tell a story.
Download sample sales data (CSV/Excel) → Customize in the generator
Tip: set a seed (e.g. b2b-demo) so you can regenerate the exact same file later or share it with a teammate.
Steps
-
Load the CSV into Power BI
In Power BI Desktop, choose Home → Get data → Text/CSV, pick your downloaded
b2b_invoices.csv, then Transform Data to open Power Query. Confirmorder_dateandship_dateare Date types and the numeric columns (quantity,unit_price,revenue,cost,margin) are Decimal/Whole number. Click Close & Apply. -
Add a date table
Create a proper calendar so time intelligence works. In Modeling → New table:
Calendar = ADDCOLUMNS( CALENDAR ( MIN ( Sales[order_date] ), MAX ( Sales[order_date] ) ), "Year", YEAR ( [Date] ), "Month", FORMAT ( [Date], "MMM" ), "MonthNo", MONTH ( [Date] ) )Then relate
Calendar[Date]→Sales[order_date](one-to-many), and markCalendaras the date table. -
Write the core DAX measures
Create these in a measures table:
Total Revenue = SUM ( Sales[revenue] ) Total Cost = SUM ( Sales[cost] ) Total Margin = SUM ( Sales[margin] ) Margin % = DIVIDE ( [Total Margin], [Total Revenue] ) Orders = DISTINCTCOUNT ( Sales[invoice_no] ) Avg Order Value = DIVIDE ( [Total Revenue], [Orders] ) Revenue MoM % = VAR Prev = CALCULATE ( [Total Revenue], DATEADD ( Calendar[Date], -1, MONTH ) ) RETURN DIVIDE ( [Total Revenue] - Prev, Prev ) -
Build the visuals
Lay out a one-page report: KPI cards for Total Revenue, Margin %, and Avg Order Value; a line chart of Total Revenue by Calendar[Date]; a bar chart of Total Revenue by category; a matrix of customer × Total Revenue sorted descending; and a slicer on
segment(segA–segD). Because the data is segment-driven, you'll immediately see the long tail of small accounts and the handful of whales. -
Add interactivity & polish
Add a
categoryslicer and a date-range slicer. Conditional-format the customer matrix on Margin % to spot low-margin accounts. Want a bigger or different file? Regenerate with more rows or turn on anomaly labels in the generator to demo exception reporting.
Why this dataset makes a better demo
Random mock data produces flat, meaningless charts. This file is generated from a simulated distributor: customer segments drive order frequency and size, big accounts get thinner margins, and occasional large buys create realistic spikes. So your dashboard shows genuine patterns — margin compression on top accounts, category mix, and a believable revenue trend — exactly what you want when presenting BI skills.