Easy filtering for array properties

Open
#39,109 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
analytics

Research direction

No files, tests, or entry points are identified. Start by locating the filtering implementation for event and person properties, then trace how array values are handled; done means users can apply “is in” and “is not in” filters to both property types without SQL.

Written by the indexing model from the issue text.

Description

enhancement
Feature request

Is your feature request related to a problem?

Yes - today it is nearly impossible to filter using array properties without SQL (https://posthog.com/tutorials/array-filter-breakdown). We see the ultimate value of PostHog as a tool to democratize data access across our organization, especially among folks who are not comfortable writing SQL (folks who already use SQL can query our data without PostHog).

Describe the solution you'd like

Include "is in" and "is not in" operators that can be used to filter array data for both event and person properties.

Describe alternatives you've considered

Using "Contains" filters to pull a part of the array as though it is a String, but this does not work if we want to filter for multiple values.

Additional context

Amplitude has this feature. It is core to their offering and works great (I was an Amplitude user for many years across multiple companies)

Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.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]
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

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.

More from PostHog/posthog

All issues in PostHog/posthog

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.