Retail · Store network
From an alert on the dashboard to the receipt that explains it
01 · The starting point
A store network can pile up thousands of receipts and have plenty of data available, but that doesn’t mean the information is easy to use. The sales data already existed: the problem was how to use it.
There was enough information to know the results, but no structure that made it easy to analyse what lay behind each change.
In this project I started from point-of-sale data and built a Power BI reporting system designed to go from an overview of the business to the detail that explains each result. I framed the project around a simple question: what should someone in leadership be able to answer when they notice something has changed?
My aim was for a variance in a KPI not to end in a number, but to be traceable until you find the store, product or receipt behind it. From there I built the model, the measures and the report pages so the analysis could move from the summary down to the detail.
02 · The goal
A KPI can tell me that sales have dropped, but that’s only the start of the analysis. I wanted the report to let you follow that variance and understand where it happens: which store is behind it, which products are driving it and what happened at receipt level.
That’s why I designed the reporting with different levels of detail. The idea is simple: start with a signal and be able to dig down until you find the context that explains it.
tables in the model
DAX measures organised into folders
pages in the report
03 · Data model
Before building the charts, I needed to put the data in order. The idea was that the same sale could be related to its store, product, date and budget without duplicating information or complicating the analysis.
To do that I built a star schema, a way of organising data that separates the sales and budget information from the data we use to analyse it, such as stores, products or dates.
The model starts from two main tables:
Ventas → what was sold, when, where and for how much.Presupuestos → which sales were planned.And I related them to three tables that add context:
Fecha → day, month, quarter and year.Productos → product and category.Tienda → store, location, floor area, employees, rent and population.
That way I can move from a general question, such as "how much have we sold?", to more specific ones such as "which store is behind the result?" or "which product is driving it?", without having to rebuild the data for each analysis.
I also added some helper tables to control elements of the dashboard, such as the store, product and category selectors and the Top N rankings. These tables don’t contain new sales: they let users interact with the report without changing the main structure of the model.
The aim wasn’t to build a complex model for its own sake, but to have an orderly base that makes it possible to ask questions about the business and reach the detail needed to answer them.
04 · DAX
As the model grew, so did the number of measures needed to analyse it. I reached 92 DAX measures and decided to organise them in a clear structure, grouping the logic so each calculation would be easier to find, maintain and reuse — the way you organise a code project, not a spreadsheet.
00. Basic
Nº Tickets, Ticket Medio, Cantidad Total, Máximo/Mínimo.
01. Cumulative
VentasYTD, VentasYTD Transcurridos, Dif YTD.
02. Previous periods
VentasAA, VentasMA, VentasDifMA / VentasDifMA%.
03. Profit
Beneficio, Beneficio%, CostesTotal.
04. Budgets
PresupTotal, PresupYTD, VentasPresup%, VentasPresupDif.
05. Last sale
DiasSinVenta, VentasUltimaFecha, VentasUltimoImporte.
06. Sales
VentasTotal, VentasMTD, VentasAVG, VentasRatioTienda/Producto.
Chart / SVG
Deltas, dynamic hex colours, max/min points and Top N ranking.
It wasn’t just about getting the measures to work. I also wanted to be able to come back to the project after a while and quickly understand where each calculation was and what it did.
05 · Power BI
The next step was to take the model into Power BI and build navigation that goes from the general to the specific. I started from the point-of-sale data and built different levels of analysis so users could dig deeper when they found a relevant change. Drill-down became a key part of the report: not just showing the figure, but letting you investigate what lies behind it.
01
Power Query
Transforming and standardising the raw point-of-sale data before it reached the model.
02
Star schema
Two fact tables and three dimensions, with five active relationships designed before the first page.
03
92 DAX measures
Organised into folders: cumulative, previous-period comparisons, profit, budgets, last sale.
04
4 T_DISC tables
Location, Store, Category/Product and Special margin: disconnected, for cascading filters without touching the schema.
05
2 What-If parameters
Dynamic TopN (Top1 to Top20) for the category and product rankings.
06
13 pages
Cover, ranking, trends, comparisons, 6 drill-through pages and 2 custom SVG tooltips.
06 · Users
Not everyone needs to look at the information in the same way. That’s why I structured the report’s 13 pages around different analysis needs and user profiles. The information changes with the level of detail each person needs, but the model and the analysis logic stay connected. That way the report works as a reporting system, not just a collection of separate dashboards.
1 page
Cover
Targets: annual performance with a bullet chart, YTD trend, sales by store vs budget and monthly analysis.
4 pages
Main analysis
Store ranking, trends with small multiples, average ticket and KPI comparison between any pair of stores.
6 pages
Drill-through
Navigation from the rankings down to the detail: category/product, margin %, product, profit and individual receipt.
2 pages
Custom tooltips
A treemap and a monthly area chart that appear when you hover over a store or a category.
From the figure to the detail behind it.
A manager can spot a variance in an indicator and start the analysis from there. From that point, they can dig into the report to find where the difference happens and end up looking at the detail needed to understand it.
The aim is for the aggregated figure to be the start of the analysis, not the end.
08 · Report pages
These are two examples of how I took the model and the analysis logic into Power BI. Each page answers a different need, but they all start from the same data structure and share a common navigation logic. The aim was to avoid isolated dashboards and build a system where the different views complement each other.


09 · What it makes possible
The report proves its worth when it’s used to answer specific questions. For example, if a KPI shows a change, I can start with the overall result, compare stores or categories and dig down until I find what’s causing the change.
The year closed at €717,304 against a budget of €776,000: a variance of −€58,700 (−7.56%). The report’s cover breaks that figure down by store: Mahón, the network’s top seller (€277,000), was also the one dragging the variance down the most (−€47,700). Sant Francesc Xavier and Ibiza (town), with less volume, were the only two in positive territory (+€6,000 and +€4,600).
A similar pattern appeared by category: Drinks and soft drinks led in both sales and margin (+37.58%), while Convenience and Express Store closed with a negative margin despite similar volume.
For me, this is one of the most interesting parts of Power BI: connecting different levels of information so users don’t have to start from scratch every time a new question comes up.
Tools
Power BI
Data model, measures, visualisation and navigation.
DAX
Calculations, KPIs and analysis logic.
Power Query
Data preparation and transformation.
Dimensional model
Star schema and relationships between facts and dimensions.
10 · Conclusion
Working on this project made me pay much more attention to what happens before building a chart. When the data is well structured, the measures are organised and the model has a clear logic, it’s much easier to build a report that can grow without turning into a set of pieces that are hard to maintain.
It also helped me understand something I think matters in Power BI: a good dashboard doesn’t end when we find the right KPI. The interesting part starts when we can ask what lies behind that KPI and have a model ready to find the answer.
From loose point-of-sale data to a model that holds up to any question.
I’ve gone from working with sales data that had no clear structure to building a Power BI model that connects the KPIs with the detail behind them. That journey — from data to model, from model to report and from report to question — is exactly the part of the project I most wanted to work on.
Interactive dashboard published in the Power BI Service
Full Power BI portfolio