Skip to content

Multiple Formats ​

Different formats can be applied to different measures in the same table using the concatenation operator.

Interactive Example ​

Try It
TABLE
  ROWS occupation * gender
  COLS education * (income.sum:currency | income.mean:decimal.2)
;
Dataset:samplesoccupation, education, gender, income
Try Variations

Query Breakdown ​

  • income.sum:currency - Total income formatted as dollars
  • income.mean:decimal.2 - Average income with 2 decimal places
  • (... | ...) - The pipe operator concatenates measures side by side

Each measure can have its own format, allowing you to display totals as currency while showing averages with decimal precision.

Powered by Malloy and DuckDB