Build Your First Power BI Report: Step-by-Step with a Real Dataset
Table of Contents
- Introduction
- The Dataset
- Step 1 — Load the CSV into Power BI Desktop
- Step 2 — Clean and Transform Data in Power Query
- Step 3 — Create a Date Table
- Step 4 — Build DAX Measures
- Step 5 — Build the Report (Page 1: Sales Overview)
- Step 6 — Build the Report (Page 2: Marketing Efficiency)
- Step 7 — Add Slicers for Interactivity
- Step 8 — Format and Polish
- Step 9 — Publish to Power BI Service
- Summary
Introduction
This guide walks through building a complete, interactive Power BI report from a single CSV file. The dataset is a daily retail sales log spanning January 2023 to September 2025 — covering five product categories, three customer segments, pricing, discounts, marketing spend, and units sold.
By the end you will have a two-page report with KPI cards, trend lines, category breakdowns, and a marketing ROI view — all driven by interactive slicers.
Prerequisites: Power BI Desktop installed (free download at powerbi.microsoft.com). No account required for Desktop.
The Dataset
File: retail-sales-2023-2025.csv
Rows: ~1,000 daily records
Date range: 01-Jan-2023 to 26-Sep-2025
| Column | Type | Description |
|---|---|---|
Date |
Text (DD-MM-YYYY) | Transaction date |
Product_Category |
Text | Electronics, Fashion, Home Decor, Sports, Toys |
Price |
Decimal | Unit price |
Discount |
Decimal | Discount amount applied |
Customer_Segment |
Text | Occasional, Premium, Regular |
Marketing_Spend |
Decimal | Daily marketing budget for that row |
Units_Sold |
Integer | Number of units sold |
Sample Data of the CSV
Date,Product_Category,Price,Discount,Customer_Segment,Marketing_Spend,Units_Sold
01-01-2023,Sports,932.8,35.82,Occasional,6780.38,32
02-01-2023,Toys,569.48,3.6,Premium,6807.56,16
03-01-2023,Home Decor,699.68,3.56,Premium,3793.91,27
04-01-2023,Toys,923.27,0.61,Premium,9422.75,29
05-01-2023,Toys,710.17,47.83,Premium,1756.83,17
...
Step 1 — Load the CSV into Power BI Desktop
- Open Power BI Desktop.
- On the Home ribbon, click Get Data → Text/CSV.
- Browse to
retail-sales-2023-2025.csvand click Open. - Power BI previews the data. Verify the column headers look correct.
- Click Transform Data — this opens the Power Query Editor where you will clean the data before loading it.
Step 2 — Clean and Transform Data in Power Query
The Date column arrives as plain text in DD-MM-YYYY format. Power BI will not recognise it as a date automatically, so you need to parse it manually.
2a — Parse the Date column
- Select the
Datecolumn. - On the Transform ribbon, click Data Type → Text (keep it as text for now).
- On the Add Column ribbon, click Custom Column.
- Name it
Date_Parsedand enter the formula:
= Date.FromText([Date], [Format="dd-MM-yyyy"])
- Click OK. A new column appears with proper date values.
- Right-click the original
Datecolumn → Remove. - Rename
Date_ParsedtoDateby double-clicking the column header. - On the Transform ribbon, confirm the data type is set to Date.
2b — Set remaining column types
Select each column and assign the correct type from the Transform → Data Type menu:
| Column | Type |
|---|---|
Product_Category |
Text |
Price |
Decimal Number |
Discount |
Decimal Number |
Customer_Segment |
Text |
Marketing_Spend |
Decimal Number |
Units_Sold |
Whole Number |
2c — Rename the query
In the Queries panel on the left, double-click the query name and rename it to Sales.
2d — Close and Apply
Click Close & Apply on the Home ribbon. Power BI loads the data into the model.
Step 3 — Create a Date Table
A dedicated date table unlocks time intelligence DAX functions like TOTALYTD and DATEADD. Create one with DAX.
- In Power BI Desktop, go to the Modeling ribbon → New Table.
- Paste the following DAX expression:
Date Table =
ADDCOLUMNS(
CALENDAR(DATE(2023,1,1), DATE(2025,12,31)),
"Year", YEAR([Date]),
"Month Number", MONTH([Date]),
"Month Name", FORMAT([Date], "MMM"),
"Month Year", FORMAT([Date], "MMM YYYY"),
"Quarter", "Q" & QUARTER([Date]),
"Year Quarter", YEAR([Date]) & " Q" & QUARTER([Date]),
"Week Number", WEEKNUM([Date])
)
- Click the checkmark to confirm.
- Mark the table as a date table: right-click Date Table in the Fields pane → Mark as date table → select the
Datecolumn. - Create a relationship: go to Model view (icon on the left sidebar), then drag
Date Table[Date]ontoSales[Date]. A one-to-many relationship is created automatically.
Step 4 — Build DAX Measures
Switch to Report view and create a dedicated measures table for organisation.
Create a measures table: Go to Modeling → New Table, type _Measures = {}, and press Enter. This creates an empty placeholder table.
Now create each measure by clicking Modeling → New Measure while the _Measures table is selected.
Core metrics
-- Total gross revenue (Price × Units Sold)
Gross Revenue =
SUMX(Sales, Sales[Price] * Sales[Units_Sold])
-- Net revenue after discounts
Net Revenue =
SUMX(Sales, (Sales[Price] - Sales[Discount]) * Sales[Units_Sold])
-- Total units sold
Total Units =
SUM(Sales[Units_Sold])
-- Total marketing spend
Total Marketing Spend =
SUM(Sales[Marketing_Spend])
-- Average discount per transaction
Avg Discount =
AVERAGE(Sales[Discount])
Marketing ROI
Marketing ROI measures how much net revenue was generated per dollar of marketing spend.
Marketing ROI =
DIVIDE([Net Revenue], [Total Marketing Spend], 0)
Year-over-year comparison
Net Revenue PY =
CALCULATE([Net Revenue], SAMEPERIODLASTYEAR('Date Table'[Date]))
Net Revenue YoY % =
DIVIDE([Net Revenue] - [Net Revenue PY], [Net Revenue PY], BLANK())
Monthly trend helper
Net Revenue MTD =
TOTALMTD([Net Revenue], 'Date Table'[Date])
Step 5 — Build the Report (Page 1: Sales Overview)
Right-click the page tab at the bottom and rename it Sales Overview.
Visual 1 — KPI Cards (top row)
Add four Card visuals across the top of the canvas:
- Drag
[Gross Revenue]onto the canvas → change visual type to Card. - Repeat for
[Net Revenue],[Total Units], and[Total Marketing Spend]. - In the Format pane, enable Callout value and set font size to 28. Disable category labels or rename them for clarity.
Tip: Hold Ctrl and click all four cards, then use Format → Align → Top to align them in a row.
Visual 2 — Monthly Net Revenue Trend (line chart)
- Insert a Line chart.
- Set X-axis to
Date Table[Month Year]. - Set Y-axis to
[Net Revenue]. - Add
[Net Revenue PY]as a second line (drag it to the Y-axis field well). - In Format → Lines, change the
Net Revenue PYline to a dashed style in a lighter colour.
This gives readers an instant year-over-year comparison on the same chart.
Visual 3 — Net Revenue by Product Category (bar chart)
- Insert a Clustered bar chart.
- Set Y-axis to
Product_Category. - Set X-axis to
[Net Revenue]. - Sort the chart by Net Revenue descending: click the ellipsis (…) on the visual → Sort by → Net Revenue → Descending.
Visual 4 — Units Sold by Customer Segment (donut chart)
- Insert a Donut chart.
- Set Legend to
Customer_Segment. - Set Values to
[Total Units]. - In the Format pane, set the Inner radius to 50% and enable data labels showing Percent of total.
Step 6 — Build the Report (Page 2: Marketing Efficiency)
Right-click the page tab and rename it Marketing Efficiency.
Visual 1 — Marketing ROI by Category (column chart)
- Insert a Clustered column chart.
- Set X-axis to
Product_Category. - Set Y-axis to
[Marketing ROI]. - Add a Constant line at
1.0(Home → Analytics pane → Constant Line) to visually mark the break-even point.
Visual 2 — Scatter: Marketing Spend vs Net Revenue
A scatter chart reveals whether higher spending actually drives revenue.
- Insert a Scatter chart.
- Set X-axis to
[Total Marketing Spend]. - Set Y-axis to
[Net Revenue]. - Set Legend to
Product_Category. - Set Size to
[Total Units]— bubble size encodes volume.
This allows you to spot which categories get the most value from marketing dollars.
Visual 3 — Monthly Marketing Spend vs Net Revenue (line and clustered column)
- Insert a Line and clustered column chart.
- Set X-axis to
Date Table[Month Year]. - Set Column Y-axis to
[Total Marketing Spend]. - Set Line Y-axis to
[Net Revenue].
Visual 4 — Marketing ROI over time (line chart)
- Insert a Line chart.
- Set X-axis to
Date Table[Month Year]. - Set Y-axis to
[Marketing ROI]. - Add a trend line: Analytics pane → Trend line → Add.
Step 7 — Add Slicers for Interactivity
Slicers make both pages interactive. Add them to a consistent position — typically a narrow left sidebar or a top strip.
Year slicer
- Insert a Slicer.
- Set Field to
Date Table[Year]. - In Format → Slicer settings → Style, choose Dropdown or Tile depending on your layout preference.
Product Category slicer
- Insert another Slicer.
- Set Field to
Sales[Product_Category]. - In Format → Slicer settings, enable Multi-select so readers can pick multiple categories.
Customer Segment slicer
- Insert a Slicer for
Sales[Customer_Segment].
Sync slicers across pages
To have the same slicer control both pages:
- Select a slicer.
- Go to View → Sync slicers.
- In the panel that appears, check the box under Sync for both pages.
- Repeat for each slicer.
Step 8 — Format and Polish
A clean, consistent layout makes the report easier to read.
Page background and theme
- Go to View → Themes and choose a built-in theme such as Executive or Frontier, or import a custom JSON theme.
- On each page, go to Format → Page background and set a subtle colour (e.g., a very light grey
#F5F5F5) to give cards visual separation from the canvas.
Visual borders and shadows
- Select all visuals (Ctrl+A).
- In Format → General → Effects, enable Shadow with low transparency and a soft blur for a subtle depth effect.
Titles
Every visual should have a clear, descriptive title:
- Format → General → Title → Text — type a human-readable label such as
"Net Revenue by Category (2023–2025)". - Keep font size consistent (e.g., 12pt for visual titles, 10pt for axis labels).
Cross-highlighting
By default, clicking a bar in one chart highlights related values in others. This is on by default but can be toggled per visual under Format → Edit interactions on the Format ribbon.
Step 9 — Publish to Power BI Service
Once you are happy with the report in Desktop:
- Click Publish on the Home ribbon.
- Sign in with your work or school Microsoft account if prompted.
- Choose a Workspace to publish into (your personal "My workspace" works fine for testing).
- After publishing, click the link to open the report in app.powerbi.com.
- In the Service, click Pin to dashboard on any visual to build a summary dashboard.
- To keep the data fresh, go to the dataset settings in the Service and configure Scheduled Refresh (requires a Power BI Gateway for local files).
Summary
Here is what you built:
| Page | Visuals |
|---|---|
| Sales Overview | 4× KPI cards, monthly trend (YoY), bar chart by category, donut by segment |
| Marketing Efficiency | ROI by category, scatter (spend vs revenue), combo chart, ROI trend |
Key DAX measures created:
| Measure | Purpose |
|---|---|
Gross Revenue |
Price × Units before discounts |
Net Revenue |
Price minus Discount × Units |
Total Units |
Sum of units sold |
Marketing ROI |
Net Revenue ÷ Marketing Spend |
Net Revenue PY |
Same period last year via SAMEPERIODLASTYEAR |
Net Revenue YoY % |
Year-over-year growth rate |
What to explore next:
- Add Row-Level Security (RLS) to restrict data by Customer Segment for different report consumers.
- Use Drill-through pages so clicking a category navigates to a detail page.
- Create a Decomposition Tree visual to let users interactively break down Net Revenue by any dimension.
- Export the report as a PDF or embed it in a SharePoint page using the embed code from the Service.