You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-10-28] [Insights Polish] [R3] Add Download CSV to each graph's ⋮ menu #104209
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
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.
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
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]
[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:
Open Insights > Spend and select a Date range, Workspace, and Group currency. Verify the charts display the correct data.
Open each chart's three-dot menu. Verify Download CSV appears only when the chart is loaded and ready.
Download the CSV and verify the columns, values, group order, and top-five limit match the chart.
Change the time grouping, Compare option, Date, Workspace, or Group currency. Export again and verify the CSV reflects the updated selections.
Verify periods without spend have zero values and dates are chronological.
Verify special characters, negative totals, and formula-like group names are handled correctly.
Activity
huult commentedon Oct 20, 2026
I reviewed this PR, so I assigned this ticket to myself.
JmillsExpensify commentedon Oct 20, 2026
Thanks, all good.
huult commentedon Oct 20, 2026
@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?
daledah commentedon Oct 20, 2026
@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
JmillsExpensify commentedon Oct 20, 2026
Yes, understood.
[-][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[/+]melvin-bot commentedon Oct 21, 2026
@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]
huult commentedon Oct 22, 2026
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:
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Oct 23, 2026
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.
huult commentedon Oct 23, 2026
This is not a deploy blocker. I just wanted to mention it.