Skip to content

docs: clarify global deduplication for sum_distinct and average_distinct#648

Open
mintlify[bot] wants to merge 1 commit into
mainfrom
docs/sum-distinct-global-dedup
Open

docs: clarify global deduplication for sum_distinct and average_distinct#648
mintlify[bot] wants to merge 1 commit into
mainfrom
docs/sum-distinct-global-dedup

Conversation

@mintlify
Copy link
Copy Markdown
Contributor

@mintlify mintlify Bot commented May 18, 2026

Summary

Clarify that sum_distinct and average_distinct always deduplicate globally on distinct_keys, regardless of which dimensions a user selects in a query.

Changes

  • Added a note under sum_distinct explaining that the deduplicated total is global and is repeated across every output row; per-group results require adding the grouping field to distinct_keys.
  • Added the equivalent note under average_distinct.

Context

Triggered by an upstream fix that restores global deduplication semantics for sum_distinct / average_distinct (matching Looker's behavior). Previously, the metric could appear to partition by selected dimensions when those dimensions were orthogonal to the distinct_keys grain, obscuring the global total. This note documents the user-visible behavior so users know how to choose distinct_keys for the result they want.

@mintlify
Copy link
Copy Markdown
Contributor Author

mintlify Bot commented May 18, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lightdash 🟢 Ready View Preview May 18, 2026, 11:27 AM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

🤖 Documentation Bot

All checks passed! No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants