What is the problem or goal you're trying to solve or accomplish?
Asset creator needs Time Comparison table widgets (current period vs. previous period, grouped by a non-temporal dimension such as destination or country) to return totals that reconcile with the same aggregation run directly against the source warehouse, for example, BigQuery. Specifically, the previous-period column must include every dimension value that had activity in either period — not only values present in the current period.
How are you solving it currently?
The dashboard uses Preset's native Time Comparison feature. Under the hood, this runs one query per period and joins the two result sets. Because destination/country is a textual (non-temporal) dimension, the join performed is a LEFT JOIN keyed on the current period's rows, rather than a full outer join. Any dimension value present only in the comparison/previous period with no matching row in the current period is silently dropped from the table, so previous-period totals under-report versus a direct SQL query, with no error or warning surfaced to the user.
As an interim workaround, build the Interactive Table chart to pre-compute both periods in a single grouped SQL query using conditional aggregation (e.g. SUM(CASE WHEN date BETWEEN ... THEN metric END)), which avoids the built-in comparison join altogether.
The tradeoff: this sacrifices the point-and-click Time Comparison control, which has to be hardcoded or templated per chart instead of configured through the chart UI, and it needs to be redone for every affected chart.
What is your recommended solution?
Perform a FULL OUTER JOIN instead of a LEFT JOIN when combining current-period and comparison-period results for non-temporal dimensions, so no dimension value is lost regardless of which period it appeared in.
This is consistent with Superset's own design intent: SIP-119 (the proposal that introduced this Time Comparison feature) already mandates a full outer join when a temporal dimension is part of the grouping, specifically to avoid data loss, but it explicitly carves out textual-only dimension comparisons for a left join instead, leaving this gap. The codebase already has the building block for a fix:
timeCompareOperator()in@superset-ui/chart-controlsaccepts aTimeCompareJoinType.FullOuteroption; it's just not the default and not exposed anywhere in the chart controls UI.Recommended fix, in order of preference:
Default the Table chart's Time Comparison feature to
TimeCompareJoinType.FullOuterfor all dimension types (accepting a modest performance cost from the larger join).At minimum, surface the join type as a configurable option in the chart's Time Comparison controls so asset creators can opt into a full outer join per chart without needing an engineering workaround.