# 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.* By Thomas Hein Thura 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](https://medium.com/@thomas.heinthura/do-you-really-need-a-data-storage-server-for-deep-learning-5bb5dc50c02d) 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. ![One order with two lines and two payments goes two ways: a direct join that repeats rows and reports $200, or an order-level step first that reports the correct $100.](assets/warehouse-grain.png) *Follow the red path for the doubled $200 total, and the green path for the $100 that matches the source.* ## 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](https://learn.microsoft.com/en-us/fabric/data-warehouse/dimensional-modeling-overview) ## 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?*