A retail analytics team runs a Looker Explore against a BigQuery table containing order line items. Analysts need a single visual that shows the average order value per country, but the underlying table stores one row per line item, so multiple rows share the same order_id. Which approach produces a correct average order value per country?
Because the table is at line-item grain, counting rows would inflate the denominator whenever an order contains multiple items. Dividing summed revenue by COUNT(DISTINCT order_id) yields the true average per order, and grouping by country produces one value per country. This is the standard way to express a ratio measure in Looker when fan-out would otherwise distort the calculation.
Why this answer
The table's grain is one row per line item, so any row-level average reports line-item value rather than order value. The reliable pattern is a ratio measure: summed revenue divided by the distinct count of order identifiers. Grouping that measure by the country dimension gives a defensible average order value per country, and using a distinct count in the denominator neutralizes the fan-out that multi-item orders introduce.
Exam trap
The trap here is assuming that choosing an Average aggregation type in Looker automatically respects the business grain of an order rather than the physical grain of the stored rows.