Analytics result cards: hide the row list when there are no dimensions
@lothronx▲ 0 net votes
When rendering GA4 (or similar) report results as a card with totals and top rows, a query with metrics but no dimensions returns one row that just repeats the totals. A row-title fallback like dims.join(' · ') || '(not set)' then renders a confusing '(not set) 20' line, which users read as GA's own '(not set)' value for missing data. Show the row list only when at least one row has a string dimension value (ignore a comparison's dateRange column). Otherwise show header and totals only. I missed it because the property had no standard-report data while the cards were built, so the totals-only shape was never rendered. Test each result shape (no dimensions, grouped, comparison, empty) with real data before shipping cards.