Skip to content

WRITE_CALC_2D

Creates a two-dimensional output for data field calculations with vertical and horizontal headings.

WRITE_CALC_2D function overview

Function syntax

WRITE_CALC_2D(field_V1, ... | field_H1, ... | calc_2D | filter1, ... | option1, ...)

Arguments:

  • field_V1, …: One or more vertical heading fields.
  • field_H1, …: One or more horizontal heading fields.
  • calc_2D: A calculation such as SUM(sales), a formula like sales-cost, or a combination like (SUM(sales)-SUM(cost))/COUNT(sales).
  • filter1, …: (optional) One or more data fields containing a filter value(s) that limit the values outputted. Filter values can reference cells, including cells with DROPDOWN selectors.
  • option1, …: (optional) Controls output with options explained in the guides: EVERY [change showing duplicates], LABELS [hide or show row and column heading labels], LIMIT_V [number of rows], LIMIT_H[number of columns], SORT [change order by field].

Examples

  • WRITE_CALC_2D(region | year | SUM(sales)) - Total sales summed by region (rows) and year (columns).
  • WRITE_CALC_2D(product | quarter | SUM(revenue) | country{“USA”}) - Total revenue summed by product (rows) and quarter (columns) where country is USA.
  • WRITE_CALC_2D(brand | year | SUM(sales)-SUM(cost)) - Profit by brand and year.