A dashboard should count each customer once even when a customer placed several orders. Which approach best fits?

Published
  1. Use SAFE_DIVIDE and handle its result explicitly.
  2. Validate join cardinality and aggregate or deduplicate at the intended grain.
  3. Use COUNT DISTINCT on the stable customer identifier.
  4. Join results to a complete calendar dimension and fill only the intended missing measures.

Comments — 0