Per-question custom empty-state message — card-level text for "No results"
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
What problem will this feature request solve?
When a question returns no rows, the card shows Metabase's default empty state. There is no way to say, on that specific question, why it is empty.
This is a problem wherever "empty" is a deliberate, meaningful outcome rather than an absence of activity. The clearest case is small-cell suppression in people analytics, public health, education, and other sensitive-population reporting: queries are written to return nothing when the underlying group is below a minimum size, so individuals can't be re-identified (see metabase/metabase#77144 for the filter and results side of the same requirement). The default empty state reads as "there is no data here" or "this is broken," when the accurate statement is "this group is too small to display." That distinction is the entire point of the control — a viewer who concludes the chart is broken will go ask someone for the underlying numbers, which is exactly what the suppression exists to prevent.
metabase/metabase#23826 asks for this message to be customizable, but scoped as an instance-wide whitelabel setting — one string for the whole Metabase. That scope cannot solve this problem. A single dashboard routinely mixes cards where empty genuinely means "no activity" with cards where empty means "suppressed for privacy," and one global string is necessarily wrong on one set or the other. Replacing "No results!" with "Data not available — group size below privacy threshold" instance-wide would be actively misleading on every card that is simply empty. The customization has to live on the question to be usable at all.
Describe the solution you'd like.
An optional empty-state message or conditional (conditional on suppression being triggered) message authored on the question, shown in place of the default text when the query returns no rows — with the instance-wide default (metabase/metabase#23826, or the current built-in string) used when the question doesn't set one.
Being able to override it on the dashboard card would help too, since the same question can carry a different meaning on different dashboards, but the question-level setting is the part that makes the feature useful.
Supporting the same rich text that question descriptions accept would let authors link to an internal policy page explaining the suppression rule, rather than restating it on every card.
How does this feature request impact you?
High where suppression is a compliance requirement rather than a preference. Teams doing HR/people analytics cannot ship a dashboard that silently looks broken to its audience — the ambiguity generates exactly the "can you just send me the raw numbers?" requests that the privacy threshold is meant to eliminate.
The current workaround is to rewrite the question in native SQL so it always returns at least one row carrying an explanatory string. That surfaces the message but gives up the visualization: the card becomes a table of text instead of the chart it should be. Choosing between "a chart that misleads when empty" and "a correct message with no chart" is a poor trade for something the author already knows how to phrase. A more robust handling of suppression would be a significant improvement for these use cases.
Additional information
#39246 shipped customization of the empty-state image in v50, so there is precedent for treating this surface as author-controlled; the text is the half that has to be per-question to be worth anything. A commenter on metabase/metabase#23826 has already made the same point — that an application-level option adds little value across an organization with hundreds of dashboards.
Related: metabase/metabase#77144 (suppression of small sample sizes in filters and results) covers making the suppression itself first-class. This request covers explaining it to the viewer once it fires; the two are complementary and neither substitutes for the other.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points; begin by tracing the question and dashboard-card empty-state rendering, including the existing empty-state image customization shipped in v50. Clarify the question-level versus card-level scope and conditional behavior, then verify that unset questions retain the default and configured messages appear for empty results.
Written by the indexing model from the issue text.
Assessment
- Domain
- analytics, data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100