WITH
WITH adds extras to a report.
FROM dealsSHOW won_valueGROUP BY ownerWITH TOTALS, PERCENT_CHANGEDURING this_quarterCOMPARE TO previous_quarterSyntax
Section titled “Syntax”WITH <modifier>[, <modifier> ...]WITH can follow GROUP BY or TIMESERIES, or stand on its own line.
| Modifier | What it adds |
|---|---|
TOTALS |
A totals row (in the API, a totals field) |
PERCENT_CHANGE |
The change against the comparison, as percent_change_<metric> columns (needs COMPARE TO) |
CUMULATIVE_VALUES |
A running total along the time grouping |
GROUP_TOTALS |
Subtotals for each value of the first grouping |
CURRENCY 'EUR' |
Money in that currency (the default is the workspace’s base currency) |
TIMEZONE 'Asia/Amman' |
“Today” and “this month” read in that time zone |
Examples
Section titled “Examples”-- Running total of won revenue this yearFROM dealsSHOW won_valueTIMESERIES monthWITH CUMULATIVE_VALUESDURING this_yearON won_at-- Orders in eurosFROM ordersSHOW totalGROUP BY payment_statusWITH CURRENCY 'EUR'