Incident Lab · SEV2 · dbt
Revenue by segment is 40% too high
Sales: the segment report shows more revenue than we have orders.
dim customers is a type-2 slowly changing dimension : when a customer changes segment, the old row is closed ( is current = false ) and a new row is added. The report joins orders to every row of a customer, so customers who changed segment are counted once per version. That's a fan-out join . Investigate: Fix revenue by segment so every order counts once, attributed to the customer's current segment. Columns: segment , revenue (rounded to 2).
