Skip to content

Commit

Permalink
fix(trends): only filter breakdown values when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Mar 28, 2024
1 parent c677074 commit 9f5153a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions posthog/hogql_queries/insights/trends/breakdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def events_where_filter(self) -> ast.Expr | None:
right=ast.Constant(value=self.query.breakdownFilter.breakdown),
)

# No need to filter if we're showing the "other" bucket, as we need to look at all events anyway.
if self.query.breakdownFilter is not None and not self.query.breakdownFilter.breakdown_hide_other_aggregation:
return ast.Constant(value=True)

if (
self.query.breakdownFilter is not None
and self.query.breakdownFilter.breakdown is not None
Expand Down

0 comments on commit 9f5153a

Please sign in to comment.