Before I Build a Data Warehouse, What Does One Row Mean?
An example of how a reasonable join can double the total on a dashboard.

In 2023 I wrote about building storage for deep learning. In my case, that article was about where to keep the datasets I needed. In a data warehouse discussion, I spend more time on a different storage question. What does one row mean to the person reading the report? My data storage server article
Say an order has two lines. One is $60 and the other is $40. The customer pays in two instalments, $70 and $30. The order totals $100 and the payments total $100. So, if I join the two line rows directly to the two payment rows on the order ID, I get four rows. Sum either amount after that join and you see $200.
Decide what the report needs to answer
For a report about which products sold, keep one row per order line. For a report about when money came in, keep one row per payment. However, if someone wants to compare ordered and paid amounts by order, aggregate both inputs to order level first and then compare.
That decision about one row is the grain. In a dimensional model, you decide the grain for each fact table before choosing the dimensions and measures. In this example, product belongs to the line-level view, while payment method belongs to the payment-level view. Microsoft Fabric dimensional modeling guide
Check what happens when the data arrives late
Now say the $30 payment arrives tomorrow. Does today's report need to update after it lands? If finance wants a report by payment date, whose date do we use? There is a note to take here. Agree that rule with the report owner and test it with a few orders before building more dashboards.
Replay the same batch too. If the load runs twice, the line and payment totals should still agree with the source. Pick a day the accounting team can check with you, then compare row counts by source, distinct event IDs and the totals that appear on the report. One day with a partial payment tells you more than a screenshot of a clean dashboard.
When I wrote about measuring an AI pilot, I wanted to know exactly what was being counted. Here I want the same thing for sales and payments. Start with one report, one order and one person who can confirm the numbers. Then decide what you need the warehouse to store.
Next: The Order Changed Today. How Do I Reconcile Yesterday’s Sales?