Margin dashboard in Power BI
We calculate the margin for each order line, including freight costs, surcharges and bonuses. For Zuiver, we developed the data warehouse that brings the sources together.
Zuiver’s first data warehouse delivered important insights and increased profits
“DSL helped us set up our very first data warehouse. […] worked with us to identify the information we need to make better decisions. This has given us important insights recently and increased our profits.” Richard Aznar Webster, CEO of Zuiver Interior Group
Why is our revenue growing while our profit is shrinking?
The sale price is in the ERP system, the freight cost is on the carrier’s invoice, and the customer rebate only appears in the annual settlement. Add up these costs for each order and you can see which products, customers and channels actually make money.
What really remains after all costs, by product, customer and channel
Gross margin analysis by order line
Revenue and cost by order line, which you can aggregate by product, customer, order or channel without the figures differing between views.
Cost broken down by component
Purchase price, freight, packaging and surcharges shown separately, so you can see which component is eroding your margin.
Loss-making orders
A list of orders and customers where, after discounts, bonuses and freight, little or nothing remains.
Sources in one data warehouse
As we did when we built a data warehouse for Zuiver that brings together different sources, we combine sales, purchasing and logistics costs.
First we define which costs belong in the margin, then calculate it per order
-
Define the margin
Which costs are included in the cost price, which discounts are deducted from revenue and at what level you measure the margin.
-
Allocate costs
Freight, surcharges and retrospective bonuses allocated across order lines using a consistent, explainable method.
-
Compare periods
A margin bridge that breaks down the difference between two periods, so you know where to intervene.
Doesn’t our ERP already show us the margin?
A good fit if
You sell many products to many customers through more than one channel, and freight costs, surcharges or bonuses paid later sit outside the order line the ERP uses to calculate margin.
Not a good fit if
You have few products, fixed prices without discount agreements, and the cost price in the ERP includes all the costs that matter.
What determines the scope
How many cost layers you want to distinguish, whether freight costs are known per shipment or only per invoice, how bonus agreements are recorded, and how many channels and entities are involved.
Isn’t an allocated cost price always an estimate?
Yes, in part. That’s why we show which costs are recorded directly against the order and which are allocated using a key, and we keep that key simple.
The margin column in the ERP, a costing model in Excel or a margin model in Power BI?
The margin column in the ERP
Choose this if the standard cost covers everything that matters and you have no retrospective rebates or customer-specific freight costs.
A costing model in Excel
Choose this if you want to calculate costs once for a limited number of products. For margins by order and by period, it quickly becomes unmanageable.
A margin model in Power BI
Choose this if sales, purchasing, freight and rebates come from different systems. Our advice: start with margins by product and customer; the margin bridge comes next.
Data Science Lab starts by bringing together sales, purchasing and logistics data
We have worked with data and AI since 2016 and are a Microsoft Partner and a Databricks Partner. For Zuiver, we developed a data warehouse that scales as its data grows.

Two orders with a surprising margin are enough to start the conversation
Stef Stoelwinder
Business DevelopmentStef is your point of contact. In our first conversation, we’ll review where prices, cost prices, freight costs and bonuses stand today.
E-mail info@datasciencelab.nl
Phone +31 (0)20 3636 724
Which products or customers are you unsure are still profitable?
Tell us which systems hold your prices, costs and agreements. We’ll reply by email or arrange an initial conversation with you.
Message sent
Thanks for your message. We’ll be in touch as soon as possible.
Frequently asked questions
An overview showing what remains after costs and discounts for each product, customer, order and channel, and why that changes. It goes beyond the margin figure in the profit and loss statement.
If you want to see margin alongside revenue, cash flow and budget for the management team, take a look at the financial dashboard.
Gross margin is revenue minus the cost of goods sold. To express it as a percentage, divide that difference by revenue. For each product, add up the figures across all order lines after discounts on the invoice.
The tricky part is the cost: using a standard cost from the ERP system or the actual costs of that delivery gives you a different result. Record which one you use.
That is something you agree on. It often includes the purchase price, inbound freight, import costs, packaging and surcharges, and sometimes outbound freight per customer. You can track purchase prices by supplier in a procurement dashboard; here, the focus is on the costs included in each unit sold.
We keep costs that cannot be assigned to an order separate.
A chart that breaks down the difference in margin between two periods into its causes: price, volume, mix and costs. Mix means you sold more products with a lower margin, even if prices stayed the same.
In Power BI, you build it using measures for each effect and a waterfall chart. We agree on the calculation in advance, as there are different approaches.
A year-end bonus or volume discount is only confirmed at the end of the year, but it relates to orders delivered during that year. We allocate an expected bonus to each order line based on the agreement, then adjust it when the final settlement arrives.
That way, a customer with a large bonus does not appear more profitable than they really are during the year.
By calculating the margin at order level, including freight and allocated costs, and then sorting the results. These are often small orders with high freight costs, bespoke products or customers with many returns.
We also show the pattern: which combinations of customer, product and channel keep recurring.
A sales dashboard tracks revenue, pipeline and targets by salesperson and customer. A margin dashboard looks at what that revenue yields after all costs.
Both use the same orders, so we calculate revenue the same way in each.
No, it shows where margin is generated and where it is lost. Determining a better price using price sensitivity and scenarios is price optimisation.
The margin model provides a good foundation for that, because the cost per product has already been established.
Want to look beyond margin, at revenue, pricing or the whole picture?
- Financial dashboard in Power BIRevenue, margin, cash flow and budget in one place for finance and management.
- Sales dashboard in Power BIRevenue, pipeline and targets by customer, product and salesperson.
- Price optimisation with data and AISet prices using price sensitivity, scenarios and real-world testing.