Financial analysis · P&L

Profit and loss account

A P&L in Power BI that adds up at any filter level

€3.53m
Budget 2021
→
€6.78m
Actual net profit 2021
+92.1%
variance against budget

scroll ↓

Context

A P&L is one of the most important reports for understanding a business.

A profit and loss account (P&L) summarises a company’s revenue, costs and expenses over a period and shows what the final result has been.

In theory, it looks simple. In practice, a P&L can have many lines, levels and relationships between items.

When I took it into Power BI, my challenge wasn’t simply getting the numbers to appear in a table. I wanted to be able to explore them without losing the financial logic behind each figure.

What is a P&L?

Before getting into Power BI: what is a profit and loss account?

A profit and loss account (P&L) helps you understand how a business has performed financially over a period. Put simply:

Revenue − costs and expenses = result

But a real P&L has many more lines and levels. The final result depends on all the items behind it.

That’s why, when a figure changes, the interesting question isn’t just how much it has changed, but also which items explain that change.

That’s exactly what I wanted to be able to explore with this project.

Target

I wanted a P&L I could explore without losing context.

My aim was to build a financial report that lets you move from an overview of the result to the detail that explains it. To do that, I worked with two main needs: looking at the P&L at different levels of detail, and understanding which items lie behind each result.

That way, the report doesn’t just show a figure: it lets you follow the path until you understand where it comes from.

0

main levels of analysis

0

reading perspectives

+0%

variance against budget

Model

I built the model from the accounting logic, not from the visual.

Before designing the dashboard, I first had to understand how the financial information was organised. A P&L isn’t just a list of numbers: each line has a meaning and is part of a structure of revenue, costs, expenses and results.

That’s why I first organised the data following that logic, and then built the visuals on top of the model.

Financial logic

The model’s structure follows the way a P&L is read.

Flexibility

The model lets you analyse the information from different perspectives.

Traceability

I can go from the result to the items that help explain it.

Data model

A central fact table and six dimensions.

To build the analysis I used a central fact table related to six dimensions: PyG · Calendar, Accounts, Departments, Scenario, Organisations and Headers.

The fact table holds the movements I want to analyse, while the dimensions add the context needed to filter and group them.

This structure lets me keep the information organised and analyse the financial items from different perspectives in Power BI. The idea was simple: the model should make the analysis easier, not limit it.

Schema

PyG
↳ Calendario ↳ Cuentas (revenue / cost / expense) ↳ Departamentos ↳ Escenario (Actual / Budget) ↳ Organizaciones ↳ Encabezados

Visualisation

Two ways to read the same information.

A P&L can answer different questions depending on how you look at it. That’s why I built two complementary views.

Expandable P&L — a view designed to start from the overall result and gradually open each level down to the detail. It lets me go from a total figure to the items that make it up without changing context.

Detail with waterfall — a view focused on understanding how the different items contribute to the final result. The waterfall chart helps show which items increase or reduce the result on the way to the final figure.

I didn’t want two different visuals just for the sake of it. Each one answers a question: where am I? and what is explaining this result?

Profit and loss account dashboard — view 1 Profit and loss account dashboard — view 2 Profit and loss account dashboard — view 3
View the interactive dashboard Power BI · DAX · Waterfall chart · Actual vs budget

The total says how much. The waterfall helps you understand why.

Net result shows the destination:

Actual net profit €6.78m

+92.1% vs budget

But this figure, on its own, doesn’t explain what has happened. To understand it, I need to look at the items that contributed to reaching that result.

That’s where the waterfall comes in: it lets you follow visually how the different items add or subtract on the way to the final result.

A figure can tell me how much has happened. The analysis has to help me understand why.

Comparison

The same result can tell a different story depending on how you look at it.

The total

€6.78m

The final result is positive and sits 92.1% above budget.

It’s the figure I need to know what the result has been.

The waterfall

The waterfall adds the context needed to understand which items contributed to reaching that result.

Combining both views, I can move quickly from the final figure to the detail that explains it.

The total answers «how much». The detail helps answer «why».

Tech stack

The tools I used

Power BI

To build the model, the measures and the report’s visuals.

DAX

To create the calculations needed to analyse the results and compare them with the budget.

Power Query

To prepare and transform the data before using it in the model.

Dimensional modelling

To organise the relationships between the fact table and the dimensions.

Financial visualisation

To show the P&L in a way that makes it possible to go from the overall result to the detail.

Challenge

The hard part wasn’t just the visual. It was keeping the meaning of every figure.

In a P&L, the sign of an amount matters. Revenue and expenses don’t behave the same way in the calculation of the result. If that logic isn’t kept correctly, a figure that looks right can end up telling the wrong story.

That’s why I paid special attention to how signs were handled in the model, in the measures and finally in the visuals.

This was one of the most important lessons of the project: in a financial report, the number being right isn’t always enough. It also has to be shown the right way.

Wrapping up

A P&L that keeps its context as the level of detail changes.

The final aim was for users to explore the information without losing sight of the result they were analysing. From the P&L total down to the detail of each item, every level had to keep the same logic.

This project helped me work on something I think is especially important in Power BI: it’s not just about getting a report to work, but about making its numbers make sense when someone uses them to understand a business.

Want to see how I built the analysis?

View the dashboard

Interactive dashboard published in the Power BI Service

See other projects

Full Power BI portfolio