Click the Pivot Table tab (next to Data Source, Output, Tabulator, Chart).
In the Groovy configuration editor, enter this:
pivotTable {
rows 'customer_country' // row labels — one row per country
cols 'year' // column headers — one column per year
vals 'net_revenue' // the numeric value to aggregate
aggregatorName 'Sum' // how to combine values (Sum, Count, Average...)
rendererName 'Table' // display as a table (or Heatmap, Bar Chart...)
rowOrder 'key_a_to_z' // sort countries alphabetically
colOrder 'key_a_to_z' // sort years in order
tableName 'vw_sales_detail' // the DuckDB view to query
hiddenAttributes 'sales_key' // hide internal ID from the UI
hiddenFromAggregators 'sales_key', 'customer_country', 'customer_name',
'continent', 'category_name', 'product_name', 'employee_name',
'month_name', 'year_quarter', 'quarter'
}
rows / cols / vals — define what goes where in the pivot grid: countries on the left, years across the top, net revenue in each celltableName — this is the key setting. DuckDB reads directly from this view. No SQL query or script needed.hiddenFromAggregators — hides text fields (country, name, etc.) from the value dropdown, so only numeric fields like net_revenue can be used as aggregatable valuesrendererName — starts as 'Table' but can be changed interactively to Heatmap, Bar Chart, etc.tableName. The pivot engine handles all the aggregation internally.