The pivot table that runs my whole P&L
Updated: 3 hours ago

I was trying to add one row to a P&L pivot table.
Gross profit.
And Excel threw a really annoying error message at me.
So I deleted the whole pivot table and started again 😅
Here's the thing though… one pivot table can run your whole P&L, your budget vs actuals and your month over month.
Because there are 4 levels of pivot tables, and each one handles something the level before it can't.
And the way around those error messages was sitting in the source data.
In the video I build all of them from scratch.
It starts with a raw general ledger export and ends with a P&L you can filter by department and month, with budget vs actuals and month over month right beside it.

Alright, so let me start where pretty much everybody starts.
A general ledger export from your accounting software. Mine had every transaction from 2024 all the way through 2026.
Account goes in the rows, amount goes in the values, and the date goes across the columns.
Excel even groups the dates for you, so you can open up any year, quarter or month.
Then I nest each vendor under its account and make class a filter at the top.
Now I can see every single account, and exactly how much I spent with each vendor inside it.
But here's the part I really want you to get.
Double click any number, and Excel opens a new sheet with every transaction behind it.

Anytime you hear the word drill down, your mind should instantly go to a pivot table.
Before I ask a department head for budget numbers, this is the view I show them. Exactly where their money has been going.
One more trick. Switch the layout to tabular and turn on repeat all item labels.
Now every row carries its own account and vendor, which makes it really easy to upload into another system or a database.
I also tried ungrouping the dates so it showed every single day.
That was a little bit much… Ctrl Z.

Okay, so Level 1 is great for digging. But it doesn't look like anything you'd hand to your CEO.
Level 2 is where it starts to look like a real P&L.
This time every row is an account in a month, tagged with its section, its summary grouping and its department.
Section goes in first, then summary grouping, then account. So revenue and operating expenses open up into groups, and then into individual accounts.
Then a timeline goes up top to pick the months, and a slicer to pick the department.

Now the neat part.
I copy the pivot table, filter the copy to operating expenses, and turn it into a pie chart.
Pick August on the timeline, and both of them update. Same with the department slicer.
And they're two completely separate pivot tables.
That's report connections. Right click the slicer, choose report connections, and tick every pivot table you want it to control.
I walk through the whole setup in the video if you want to see every click.

Alright. This is the level where pivot tables start fighting back.
My Level 2 P&L was missing gross profit, net operating income and net income.
The built in way to add them is a calculated item. You click into the section field and write the formula, income minus cost of goods sold.
That's where I got the annoying message from the top of this email.
So I rebuilt it with just the section field, and this time the calculated items worked.
Then I added the accounts back in… and Excel filled my calculated rows with a pile of zero values.
A value filter set to "does not equal zero" cleans that up.
Then I tried to show the same number twice, to compare periods. Another error.
This is another really big reason why I don't like calculated items.
So here's what I do instead.
I bake gross profit, net operating income and net other income straight into the source data, as rows of their own.
The pivot table reads them like any other line, and you get around those annoying calculated items completely.
That's the trick I mentioned at the top.
From there you can add month over month: show values as, difference from, previous month.

And now we are cooking.
It's still not perfect though. Percent of income only worked at the section level, not for the summary groupings or the accounts.
Oh man, these pivot tables are just so stubborn.
I show every one of these quirks in the video, so you know exactly where they'll bite you.

Okay, so how do you get a pivot table to stop being stubborn?
You move up to Power Pivot.
Instead of one flat table, you connect your actuals, your budget, your transactions and your account mapping with relationships.
Then gross profit, operating income, net income and your margins become DAX measures, which are formulas that live inside Power Pivot instead of in a cell.
And one pivot table covers all of it. Budget vs actuals, month over month, department slicers, timelines, and a drill through to the transactions behind any number.
DAX handles a lot of what Level 3 fights you on.
So a lot less deleting the whole thing and starting again.
Now, I'll be honest with you. I personally am the biggest fan of a really well structured spreadsheet with the proper formulas.
But if your P&L is going to live in a pivot table, Level 4 is the one to aim for.
I build the Level 4 report in the video if you want to see it come together.

Now look.
Level 4 takes a mapping for every account and a measure for every metric.
I built Model Wiz so you can skip that part. It connects to your accounting software and builds your P&L in Excel, with gross profit, net operating income and net income already in place.
So which level are you at right now, and what's stopping you from getting to the next one?
Hit reply and let me know. I read every single one.

Josh (Your CFO Guy)
Thanks for reading my article. My goal is to help you grow in your career with proper Finance and Accounting.
If we're not already connected on Social media, let's get connected and send me a message to say hi. I promise to respond






