Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pivot table reports/exports pick an arbitrary metric for a mixed-metric total instead of blanking it

Open Beginner friendly
#44,725 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in superset/charts/client_processing.py at _collapsed_metric and read how the scheduled-report, alert, CSV, and Excel export path handles mixed-metric totals. Align those totals with the blank behavior described for the live pivot_table_v2 view, update the stale docstring, and verify that percent-mode exports no longer calculate a value for a mixed-metric slot.

Written by the indexing model from the issue text.

Description

preset-io
Bug description

superset/charts/client_processing.py's _collapsed_metric (used by the scheduled-report/alert/CSV/Excel export path for pivot_table_v2) resolves a mixed-metric total (a "Metric"-collapsed row/column/grand total on a pivot with 2+ metrics on one axis) to an arbitrary metric -- the last one in the chart's configured metric order -- and computes a real percentage for it in showValuesAs percent modes.

This now disagrees with the live browser view: apache/superset#44657 changed the browser to render that same cell blank instead, since there's no single meaningful value for "MAX(sales) combined with MEDIAN(msrp)" (or whichever two metrics happen to share the collapsed slot). A scheduled report or export can therefore show a specific, plausible-looking percentage for a cell the interactive chart deliberately leaves blank.

_collapsed_metric's own docstring is now stale -- it explicitly says it mirrors "the last metric pushed into the shared slot (see the metricAxis handling in react-pivottable/utilities.ts)", which was the browser's old behavior before #44657.

How to reproduce
  1. A pivot_table_v2 chart with 2+ metrics laid out on columns (metricsLayout: Columns), showValuesAs set to a percent mode, row and/or column totals enabled.
  2. Compare the grand-total/Total-axis cell opposite the Metric pseudo-dimension between the live Explore view (blank, per #44657) and a scheduled report, alert, or CSV/Excel export of the same chart (a computed percentage).
Scope note

This is separate from #44625 (which was about non-additive metrics re-aggregating already-aggregated cells in Actual Values mode, fixed by #44631) -- this is specifically about the mixed-metric "last metric wins" fallback in _collapsed_metric, only reachable with 2+ metrics sharing a collapsed axis slot.

Dominant language
Python
Stars
74.8k
Forks
18.4k
Avg merge
2d 19h
Merged PRs (30d)
667

Getting set up

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 apache/superset

All issues in apache/superset

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.