PostHog / PostHog/posthog

Property value "average" should work for person properties or disallow them

Open
#28,982 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug team/product-analytics
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Description

Bug Description

Bug description

The property average math for a trends insight with a person property looks at event properties instead of person properties.

How to reproduce

  1. Create a new trends insight
  2. Select "Property value [average]" as math
  3. Select a person property
  4. Check the SQL in the debug tab and see that we're using an event property

Additional context

https://posthoghelp.zendesk.com/agent/tickets/24638 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/28853)

Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the trends insight described in the issue, selecting “Property value [average]” with a person property. Inspect the SQL in the debug tab and trace where the property source is selected; done means the average uses the person property or the UI disallows this combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
analytics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.