Skip to content

WRITE_CALC_H

Creates rows of data fields and calculations presented in columns of data - a table reoriented 90 degrees.

WRITE_CALC_H function overview

Function syntax

WRITE_CALC_H(field1, calc1, ... | filter1, ... | option1, ...)

Arguments:

  • field1, calc1, …: Data fields or calculations. Calculations include range functions like SUM(sales), formulas like sales-cost, or combinations 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 heading labels], LIMIT[number of columns outputted], SORT [change order by field or calculation].

Examples

  • WRITE_CALC_H(product, SUM(sales)) - Product values with total sales.
  • WRITE_CALC_H(region, SUM(sales), SUM(cost)) - Region values with total sales and cost.
  • WRITE_CALC_H(product, SUM(sales) | country{“USA”}) - Product sales for the country USA.
  • WRITE_CALC_H(product, SUM(sales) || SORT[!calc1{!ZA},product], LIMIT[5]) - Top 5 products sorted by sales. Note, the sort UI populates the sort argument in the formula.