Skip to content

[Due for payment 2026-10-28] [Insights Polish] [R3] Add Download CSV to each graph's ⋮ menu #104209

Open

Description

@JmillsExpensify

Background

Each graph on the Insights Spend dashboard has a ⋮ menu with one action, View on Spend, which opens the underlying expenses as a table. From there, it's possible to download the data as CSV, though it's an extra click.

This issue adds Download CSV to each graph's ⋮ menu, making it easier to export the grouped totals comprising that graph.

Product and design details

Image

The menu option

  • Download CSV sits below View on Spend in each graph's ⋮ menu, with the table icon from the mock. It's the same menu on desktop and mobile.
  • It shows whenever the graph has data. It's hidden while the graph is loading, in its empty state, or showing Refresh needed.

Which data is exported

  • Each export runs that graph's query, plus the page's Date, Workspace, and Group currency filters, the same way View on Spend builds its query:
    • Spend over time: type:expense group-by:<grouping> sort-by:group-<grouping> sort-order:asc, where <grouping> is the graph's current Group by (day, week, month, quarter, or year).
    • Top spenders: type:expense group-by:from sort-by:group-total sort-order:desc
    • Top merchants: type:expense group-by:merchant sort-by:group-total sort-order:desc
    • Top categories: type:expense group-by:category sort-by:group-total sort-order:desc
  • The export doesn't include Compare data yet. It always exports the current period's values, whatever Compare is set to, because exporting comparisons depends on Expensify/Expensify#643033. We'll add comparison columns once that's available.
  • With Group by set to Running total, the export still has period-by-period totals, at the grouping the running total plots by. There's no running total column, so the file has the same columns whichever Group by is selected.
  • Rows only include expenses the person can already see, following today's Spend permissions.

Empty periods

  • Spend over time exports a row for every period in the Date range, including periods with no spend, at 0.00 with 0 expenses. That way, charts and formulas built from the file don't silently skip a period.
  • The ranking graphs only export groups that have spend, since a merchant with no spend isn't part of the range.

The file

  • The download reuses our existing export flow; no new component. Small files download immediately, and larger files are delivered by Concierge, as with other exports.
Issue OwnerCurrent Issue Owner: @huult

Activity

  1. added
    ImprovementItem broken or needs improvement.
    InternalRequires API changes or must be handled by Expensify staff
    on Oct 16, 2026
  2. huult commented on Oct 20, 2026

    @huult
    Contributor

    I reviewed this PR, so I assigned this ticket to myself.

  3. self-assigned this
    on Oct 20, 2026
  4. JmillsExpensify commented on Oct 20, 2026

    @JmillsExpensify
    ContributorAuthor

    Thanks, all good.

  5. huult commented on Oct 20, 2026

    @huult
    Contributor

    10. Thanks, all good.

    Image

    @JmillsExpensify I'd be happy to take on the C+ review for the other [Insights][R3] tickets as well. Could you add me as C+ for those?

  6. daledah commented on Oct 20, 2026

    @daledah
    Contributor

    @JmillsExpensify @huult Quick heads-up based on #103168 (comment), @truph01 and I are already the assigned C+ reviewers for the [Insights] project.

    @huult is of course still the C+ on this one since they reviewed the related PR 👍

    Cc @cristipaval

  7. JmillsExpensify commented on Oct 20, 2026

    @JmillsExpensify
    ContributorAuthor

    Yes, understood.

  8. changed the title [-][Insights Polish] [R3] Add `Download CSV` to each graph's `⋮` menu[/-] [+][Due for payment 2026-10-28] [Insights Polish] [R3] Add `Download CSV` to each graph's `⋮` menu[/+] on Oct 21, 2026
  9. melvin-bot commented on Oct 21, 2026

    @melvin-bot

    @huult

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-10-28. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  10. huult commented on Oct 22, 2026

    @huult
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      It's a new feature.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    • Enable Insights beta

    Test:

    1. Open Insights > Spend and select a Date range, Workspace, and Group currency. Verify the charts display the correct data.
    2. Open each chart's three-dot menu. Verify Download CSV appears only when the chart is loaded and ready.
    3. Download the CSV and verify the columns, values, group order, and top-five limit match the chart.
    4. Change the time grouping, Compare option, Date, Workspace, or Group currency. Export again and verify the CSV reflects the updated selections.
    5. Verify periods without spend have zero values and dates are chronological.
    6. Verify special characters, negative totals, and formula-like group names are handled correctly.

    Do we agree 👍 or 👎

  11. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. huult commented on Oct 23, 2026

    @huult
    Contributor

    This is not a deploy blocker. I just wanted to mention it.

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

Metadata

Metadata

Labels

ImprovementItem broken or needs improvement.InternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions