PostHog / PostHog/posthog

Using formulas prevents breakdown column from being exported to CSV/XLSX breakdowns

Open
#33,987 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug Description

If you use formulas and breakdowns on the same insight, the CSV/XLSX export option becomes almost useless as formula names override the breakdown parameters.

Reproduce:

  1. Create a simple trends insight (i.e. Pageviews, total count)
  2. Add a breakdown (by countrycode, etc)
  3. Save the insight
  4. Export as a CSV... The "series" column will show the country code for each row.
  5. Enable Formula Mode
  6. Create a simple formula (i.e. Formula is "A/1000", Formula Name is "Pageviews (in thousands)")
  7. Save the insight.
  8. Export as a CSV again... The "series" column will just be the formula name (no way to see which country code the row is talking about), export becomes far less useful.
Debug info
Affects self hosted and cloud.

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

No file or test is named. Reproduce the CSV and XLSX exports with a breakdown and a formula, then trace the export path for insights combining these options; done means the series data preserves the breakdown value while still representing the formula output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.