From 4fde752b54acf2d36b0cbdfaba9785dd982174cf Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 29 Apr 2026 11:08:43 -0400 Subject: [PATCH] Default forecast pivot to value column with pf_iter rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New forecasts opened the pivot with all dimensions stacked as group_by and the date column as split_by — wide and slow to read. Open with just the value column showing and pf_iter as rows so the first thing you see is iteration totals. Co-Authored-By: Claude Opus 4.7 --- ui/src/views/Forecast.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/src/views/Forecast.jsx b/ui/src/views/Forecast.jsx index 76e2b00..7557f59 100644 --- a/ui/src/views/Forecast.jsx +++ b/ui/src/views/Forecast.jsx @@ -238,11 +238,14 @@ export default function Forecast({ sourceId, versionId }) { await viewer.restore(cfg) if (cfg.expand_depth != null) await applyDepth(cfg.expand_depth) } else { - const dims = meta.filter(c => c.role === 'dimension').map(c => c.cname) - const dateCol = meta.find(c => c.role === 'date')?.cname - const cfg = { table: tableName, settings: false, plugin_config: { edit_mode: 'SELECT_REGION' } } - if (dims.length) cfg.group_by = dims.slice(0, 2) - if (dateCol) cfg.split_by = [dateCol] + const valueCol = meta.find(c => c.role === 'value')?.cname + const cfg = { + table: tableName, + settings: false, + group_by: ['pf_iter'], + columns: valueCol ? [valueCol] : [], + plugin_config: { edit_mode: 'SELECT_REGION' } + } await viewer.restore(cfg) }