Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omni.co/llms.txt

Use this file to discover all available pages before exploring further.

The format parameter sets the default display format for a ‘s values. s can use one of Omni’s named formats, an Excel-style string, a Mustache template, or a conditional format that selects a format dynamically. Formats can also be set on a per-query basis from visualization configuration, using the same format types. See Formatting values for more information on format types and examples.
Formats are applied after the SQL runs, so they do not impact grouping. To handle grouping with truncation, use ROUND() or FLOOR().

Syntax

format accepts either a string or a conditional object:
<dimension_or_measure_name>:
  format: <format_string>

Properties

Use the tabs to view the properties for string values and conditional objects.
format
string
required
The format definition. This can be any valid format type:
  • A named format (e.g., currency_2, percent_1)
  • An Excel-style string (e.g., '#,##0.00 "kg"')
  • A reference to a model-level custom format
See Formatting values for the full reference on all format types, including named formats, Excel-style strings, conditional formats, model constants, locale settings, and more.

Examples

Currency format
sale_price:
  format: currency_2
Big number format
revenue:
  format: big_2
Custom Excel-style format with units
avg_weight:
  sql: '"weight"'
  aggregate_type: avg
  format: '#,##0.00 "kg"'
Custom format reference
avg_margin:
  sql: '"margin"'
  aggregate_type: avg
  format: margin_bps
Conditional format
revenue:
  format:
    depends_on:
      field: orders.currency_code
      conditions:
        - condition:
            equals: USD
          value: usdcurrency_2
        - condition:
            equals: EUR
          value: eurcurrency_2
      else: currency_2