Pivot analysis
midnight themegetPivotRowModel() cross-tabs revenue by region × quarter with subtotals + grand total.
Pivot modelCross-tabSubtotals
Region | Q1 | Q2 | Q3 | Q4 |
|---|---|---|---|---|
| APAC | $839,772 | $1,443,692 | $1,597,756 | $974,132 |
| EMEA | $1,842,884 | $1,207,368 | $1,582,964 | $899,660 |
| LATAM | $962,775 | $982,995 | $1,774,819 | $1,615,771 |
| North America | $1,044,142 | $1,097,152 | $1,245,475 | $1,653,679 |
getPivotRowModel() cross-tabs 100 sales rows into revenue by region × quarter, with a grand-total row — then generatePivotColumnDefs() turns the dynamic columns into a normal <Table>.