Retail Analytics Dashboard for Power BI: Sales, Margin and Store Performance
Retail leaders ask the same questions every Monday. Are sales growing once new stores are removed? Which stores are ahead of budget? Where is margin leaking, to discounts or to fresh-food waste? Is labour keeping pace with sales? Answering them usually means stitching together till data, rosters, budgets and survey results by hand.
This dashboard answers them on one data model. It has ten report pages, a star schema with four fact tables and 111 ready-made measures, and it ships with sample data for a fictional Australian supermarket group, Banksia Fresh Markets, so you can explore it straight away. This page also walks through how the model is designed and why, so you can reuse the approach for your own data.
1. What was built
Banksia Fresh Markets Pty Ltd is an invented supermarket chain trading in NSW, VIC, QLD, WA, SA, TAS, ACT and NT. Every number is synthetic, generated with a Python script so the patterns look real: Christmas peaks, Easter lifts, closed days on Christmas Day and Good Friday, storm-week dips in Queensland, a July wage-award rise in labour cost, and three new stores that ramp up after opening.
The report is built for the questions a head office asks every week: Are we growing? Which stores and categories drive it? Where do we lose margin to discounts and waste? Are customers coming back? Are we hitting budget?
What is inside: ten report pages
1. Executive overview
The first page is built for a head-office review. Seven headline cards show net sales, year-on-year growth, gross margin, transactions, average basket, like-for-like growth and target attainment. Below them you see net sales and gross margin by month, sales by state, a weekly trend and sales by category, plus text insights that name the largest state, the largest category, the peak month and the current sales momentum.
2. Sales performance
This page explains where growth comes from. It compares net sales with the prior year by month, shows fiscal year-to-date against last year, rolling four-week sales, sales by fiscal quarter, the weekday pattern and year-on-year growth by state.
3. Store scorecard
A ranked scorecard lists every store with net sales, growth, target attainment, margin, waste, NPS and labour cost, with green, amber and red font colours driven by measures. A bar chart ranks stores by sales, a scatter plot compares sales with margin, and a chart compares sales per square metre by store format.
4. Category and product
See what customers buy. A treemap shows the category mix, a bar chart ranks margin by category and a long bar chart ranks all 24 product lines by sales. Cards track private label share, share sold on promotion, discount rate and average selling price.
5. Margin and waste
This page shows where margin leaks. Gross margin and margin after waste are tracked by month, waste cost is split by category and product line, and the discount rate shows how promotions affect the margin. The change in margin against last year is shown in percentage points.
6. Customers and online
Transactions and average basket by month, loyalty penetration and online share of sales, footfall conversion, NPS by store and complaints per 10,000 transactions.
7. Labour and availability
Labour cost as a share of sales, sales per labour hour by store, transactions per labour hour, average hourly rate and on-shelf availability over time, so you can see whether productivity keeps up as wages rise.
8. Targets and fiscal year
Net sales against budget by month, target attainment by store, the number of stores above and below target, gross margin against target and a category by fiscal year matrix. Budgets are phased to daily level, so any date range compares like with like.
9. Daily trends
A day-level view with a date range slicer and a metric picker. Choose net sales, gross margin, transactions, units, waste cost, labour cost or online sales, and one chart redraws. A monthly summary table and a weekday chart sit underneath.
10. Definitions and data notes
The last page defines every key measure in plain language, from net sales to like-for-like growth, and describes the model and the sample data, so new users and stakeholders can see exactly how each number is calculated.
Fiscal year, month and state filters stay in sync across pages, and a navigation rail on the left switches pages.
3. The data: six CSV files
The project loads six CSV files from one folder. The folder path is a single Power Query parameter called DataFolder, so moving the project to another machine means changing one text value.
| File | One row is | Rows | Key columns |
|---|---|---|---|
| fact_sales.csv | Date × store × product line | ~307,000 | Units, gross and net sales, discounts, cost of goods, waste, private label and promotion sales |
| fact_store_daily.csv | Date × store | ~12,800 | Footfall, transactions, loyalty transactions, online orders and sales, labour hours and cost, on-shelf availability |
| fact_targets.csv | Date × store | ~12,800 | Net sales, gross margin and transaction budgets |
| fact_feedback.csv | Week ending × store | ~1,800 | Survey responses, promoters, passives, detractors, complaints |
| dim_store.csv | Store | 16 | State, city, format, region, open date, floor area, latitude and longitude |
| dim_product.csv | Product line | 24 | Category, department, perishable flag, target margin, average unit price |
Why four fact tables? Because the data is recorded at different levels of detail. Sales are measured per product, but transactions, labour and online orders are measured per store per day, and surveys per store per week. Forcing everything into one wide table would repeat store-day values on every product row and double count them. Separate fact tables keep each number at its natural grain.
4. Data modeling: the star schema
A star schema puts descriptive attributes (who, what, when, where) in dimension tables and numeric events in fact tables. Dimensions filter and group; facts get summarised. Power BI's engine is optimised for this layout, and DAX stays simple because filters flow one way, from dimensions to facts.
| Table | Type | What it holds |
|---|---|---|
| Fact_Sales | Fact | Units, gross and net sales, discounts, cost of goods, waste, private label and promotion sales by date, store and product line |
| Fact_StoreDaily | Fact | Footfall, transactions, loyalty, online, labour and availability by date and store |
| Fact_Targets | Fact | Daily phased budgets by store |
| Fact_Feedback | Fact | Weekly NPS survey counts and complaints by store |
| Dim_Date | Calculated dimension | Australian fiscal calendar (July to June), fiscal quarters, Monday to Sunday weeks, weekday flags |
| Dim_Store | Dimension | 16 stores with state, city, format, region, open date, floor area and coordinates |
| Dim_Product | Dimension | 24 product lines in 9 categories and 5 departments |
| Metric Selector | Calculated table | Disconnected list of metrics that drives the Daily Trends chart |
Relationships
| From (many side) | To (one side) | Note |
|---|---|---|
| Fact_Sales[Date], Fact_StoreDaily[Date], Fact_Targets[Date] | Dim_Date[Date] | Daily grain |
| Fact_Feedback[WeekEnding] | Dim_Date[Date] | Weekly facts join on the Sunday that ends the week |
| All four facts, StoreID | Dim_Store[StoreID] | One store dimension shared by every fact |
| Fact_Sales[ProductLineID] | Dim_Product[ProductLineID] | Only sales are recorded by product |
All relationships are many-to-one with single-direction filtering and no bidirectional shortcuts. The dimensions are shared, so a State slicer filters sales, labour, budgets and NPS together. Raw numeric columns in the fact tables are hidden, so report authors can only use measures. That removes the risk of someone summing a column that should have been averaged.
5. Calculated tables and columns
Calculated tables (2)
Dim_Date is built in DAX from the first and last sales date. It carries an Australian financial year (1 July to 30 June), fiscal quarters, Monday-to-Sunday weeks and a weekday or weekend flag. Each text column has a hidden sort column so months and weeks sort in time order, not alphabetically.
Dim_Date =
ADDCOLUMNS(
CALENDAR(MIN(Fact_Sales[Date]), MAX(Fact_Sales[Date])),
"FY Number", YEAR([Date]) + IF(MONTH([Date]) >= 7, 1, 0),
"FY", "FY" & RIGHT(YEAR([Date]) + IF(MONTH([Date]) >= 7, 1, 0), 2),
"FY Month No", MOD(MONTH([Date]) - 7, 12) + 1,
"Week Start", [Date] - WEEKDAY([Date], 2) + 1,
"Week Ending", [Date] - WEEKDAY([Date], 2) + 7
-- plus Month, Month Year, Month Sort, FY Quarter, Day Name ...
)
Metric Selector is a small disconnected table of seven metrics. It is not related to anything. A slicer on it feeds a SWITCH measure, so one line chart on the Daily Trends page can show net sales, gross margin, transactions, units, waste cost, labour cost or online sales without seven separate charts.
Calculated columns (7)
| Table | Column | Why it exists |
|---|---|---|
| Dim_Store | Comp Status | "Comp" if the store opened before the first day of data. Used for like-for-like growth. |
| Dim_Store | Size Band | Groups stores by floor area: compact, medium, large. |
| Dim_Store | Opening FY | Fiscal year in which the store opened. |
| Dim_Product | Perishability | Turns the Y/N flag into readable labels. |
| Dim_Product | Margin Tier | High, medium or low margin from the target margin. |
| Dim_Product | Price Band | Everyday, mid or premium by unit price. |
| Fact_Feedback | Weekly NPS | NPS for each store-week. |
Rule of thumb: use a calculated column for something you slice or group by, which is an attribute. Use a measure for something you total or compare. Comp Status is an attribute of a store, so it is a column. Net sales is a number that changes with filters, so it is a measure.
6. DAX measures that matter
The model has 111 measures in one table, grouped into eight display folders: Sales, Margin and Waste, Customers and Online, Labour and Availability, Targets, Time Intelligence, Insights and Helpers. Most are tiny, and they build on each other.
Base measures first, then ratios
Net Sales = SUM(Fact_Sales[NetSales])
COGS = SUM(Fact_Sales[COGS])
Gross Margin $ = [Net Sales] - [COGS]
GM % = DIVIDE([Gross Margin $], [Net Sales])
Waste % of Sales = DIVIDE([Waste Cost], [Net Sales])
Ratios use DIVIDE instead of the / operator, so a zero denominator returns blank instead of an error.
Year-on-year and fiscal year-to-date
Net Sales PY = CALCULATE([Net Sales], SAMEPERIODLASTYEAR(Dim_Date[Date]))
Net Sales YoY % =
IF(ISBLANK([Net Sales PY]), BLANK(),
DIVIDE([Net Sales] - [Net Sales PY], [Net Sales PY]))
Net Sales FYTD =
VAR _d = MAX(Dim_Date[Date])
VAR _fy = MAX(Dim_Date[FY Number])
RETURN CALCULATE([Net Sales], REMOVEFILTERS(Dim_Date),
Dim_Date[FY Number] = _fy, Dim_Date[Date] <= _d)
Writing year-to-date with the FY Number column keeps the July year-end explicit and easy to audit. The growth measure returns blank, not 100%, when there is no prior year, which is why the first fiscal year shows no growth figures.
Like-for-like growth
LFL Net Sales = CALCULATE([Net Sales], Dim_Store[Comp Status] = "Comp")
LFL Growth % =
IF(ISBLANK([LFL Net Sales PY]), BLANK(),
DIVIDE([LFL Net Sales] - [LFL Net Sales PY], [LFL Net Sales PY]))
Total growth includes new stores. Like-for-like removes them, which is the figure retail analysts watch. The calculated column from section 5 makes it a one-line filter.
Targets
Target Attainment % =
IF(ISBLANK([Net Sales Target]), BLANK(),
DIVIDE([Net Sales (All Products)], [Net Sales Target]))
Stores Above Target =
COUNTROWS(FILTER(VALUES(Dim_Store[StoreID]), [Target Attainment %] >= 1))
Dynamic text and colours
The insight cards on the executive overview are measures that return sentences, such as the largest state and its share of sales. Colour rules are also measures that return hex codes, which cards and table columns use for conditional font colour. Thresholds live in one place instead of being scattered across visuals.
Target Color =
IF(ISBLANK([Target Attainment %]), "#66756F",
IF([Target Attainment %] >= 1, "#1E8E5A",
IF([Target Attainment %] >= 0.98, "#E9A820", "#D9534F")))
Measures retail teams actually use
| Measure | Meaning |
|---|---|
| Net sales | Sales after promotional discounts, excluding GST |
| Gross margin % | Net sales less cost of goods, divided by net sales |
| Margin after waste | Gross margin less stock written off at cost |
| Like-for-like growth | Sales growth for stores trading in both periods, so new stores do not flatter the result |
| Fiscal year-to-date | Sales from 1 July to the selected date, compared with the same point last year |
| Average basket value | Net sales divided by transactions |
| Loyalty penetration | Share of transactions with a loyalty card |
| Online share | Click and collect plus delivery sales as a share of net sales |
| NPS | Percentage of promoters minus percentage of detractors |
| Sales per labour hour | Net sales divided by hours worked |
| Target attainment | Net sales divided by phased budget |
7. Modeling pitfalls and how they are handled
| Pitfall | How the model handles it |
|---|---|
| A category slicer should not change store-level facts such as transactions, labour and online sales, which are not recorded by product. | Ratios like average basket use Net Sales (All Products), which applies REMOVEFILTERS(Dim_Product). Without it, selecting Bakery would divide bakery sales by all transactions. |
| Weekly NPS joined to a daily date table. | The fact is keyed to the week-ending Sunday, so month and week visuals work. A single-day filter shows NPS only on Sundays, which is expected for weekly surveys. |
| Closed days (Christmas Day, Good Friday). | There are no rows on those dates, so trading-day counts and per-store-day averages stay correct without adjustments. |
| New stores distort growth. | The Comp Status column plus like-for-like measures. |
| Months and weeks sorting alphabetically. | Hidden sort columns (Month Sort, FY Month No, Week Start, Day Sort) set as the sort-by column. |
| Budgets only monthly. | Budgets are phased to daily level, so any date selection compares like with like. |
8. PBIP, TMDL and the DataFolder parameter
The project is saved as a Power BI Project (PBIP). Instead of one binary file, the report and the semantic model are plain-text folders. The model uses TMDL, one readable file per table, and the report uses the PBIR format, one JSON file per visual. You can read and compare the model in a text editor, track changes in Git, and even generate whole projects from code.
Banksia_Fresh_Markets/
Banksia_Fresh_Markets.pbip
Banksia_Fresh_Markets.SemanticModel/definition/
model.tmdl relationships.tmdl expressions.tmdl
tables/ Fact_Sales.tmdl Dim_Date.tmdl _Measures.tmdl ...
Banksia_Fresh_Markets.Report/definition/pages/...
Data/ fact_sales.csv dim_store.csv ...
Every CSV query reads from the same parameter, so there are no hard-coded paths inside the queries:
Source = Csv.Document(
File.Contents(Text.TrimEnd(DataFolder, "\") & "\fact_sales.csv"),
[Delimiter = ",", Columns = 11, Encoding = 65001, QuoteStyle = QuoteStyle.Csv])
Lesson from building it: the PBIR format validates every JSON file against a strict schema. One property in the wrong place, for example a slicer sync setting sitting outside the visual object, stops Power BI Desktop from opening the whole project, and the error names the exact file and line. When you edit or generate PBIP files, fix the first error, reopen and repeat.
9. About the sample data
The report uses synthetic data for a fictional Australian supermarket group with 16 stores across NSW, VIC, QLD, WA, SA, TAS, ACT and NT. It was built to show realistic patterns: Christmas and Easter peaks, closed days on Christmas Day and Good Friday, storm-week dips in Queensland, a July wage rise in labour cost, and three new stores (Gold Coast Robina, Darwin Casuarina and Joondalup) that ramp up after opening. The figures are illustrative and not real company results. Data runs from 1 July 2024 to 31 October 2026, so the latest fiscal year is a four-month year-to-date.
Note: Transactions, labour, online and target data are not recorded by product, so ratios that use them ignore any product or category filter. This is intentional and documented on the definitions page.
10. Using it with your own data
- Open the project in Power BI Desktop, which is free to download.
- Put your own CSV exports in the Data folder, using the same column names, and set the DataFolder parameter to that folder.
- Keep the level of detail of each file, and the measures and visuals keep working.
- Refresh, check the totals against a report you already trust, then publish.
Suggested levels of detail: date, store and product line for sales; date and store for daily store metrics and budgets; week and store for survey results. Need practice data first? Try the free Docynx Sample Data Generator.
Who it is for
- Retail and supermarket analysts who need a ready reporting layer.
- Franchise, regional and category managers who compare stores against peers and budget.
- Power BI developers who build retail reporting for clients and want a solid model to start from.
- Students and career changers who want to see how retail KPIs are modelled.
11. Frequently asked questions
Why not put everything in one big table?
Different measures live at different levels of detail. One flat table would repeat store-day values on every product row and inflate totals. A star schema also compresses better and makes DAX shorter.
Do I need a paid Power BI license?
You can open and explore the project in Power BI Desktop for free. Sharing reports in the Power BI service needs the licenses your organisation already uses for that.
Is the data real?
No. Real retail data is confidential, so this is synthetic data that shows how the report behaves. You connect your own data to use it for real decisions.
Can I use this structure for my own business?
Yes. Replace the six CSV files with your own exports at the same levels of detail: sales by date, store and product; daily store metrics; budgets; survey results. The measures and pages work once the column names match.
Can I change the design or add pages?
Yes. It is a standard Power BI project (PBIP), so you can change visuals, colours and pages, and add your own measures.
What if I need it adapted to my company?
Email contact@docynx.com and describe your data and the questions you need answered, or see our custom dashboard service.
Get the Retail Analytics Dashboard
The Power BI project, the data model and the sample data are available on Gumroad. Check the Gumroad page for the current price and the full list of what is included.
Get it on Gumroad → ✉ Ask a questionA note on interpretation: This dashboard is a reporting and learning tool. The sample figures are fictional, and Banksia Fresh Markets is an invented company. It is not financial advice, and any numbers you produce from your own data should be reviewed by qualified staff before they are used for decisions.