Skip to main content

Data Format

You can format AML fields to improve readability for your reports. This section will help you define a Data-Format-As-Code using AML.

Available formats include:

High-level concept

To format an AML dimension/measure, you will need to add a format property to the dimension/measure definition that contains a format pattern to this dimension/measure.

If your pattern is invalid, Holistics will fall back to the default format to render your data.

Model public_accounts {
type: 'table'
label: 'Accounts'
table_name: '\"public\".\"Accounts\"'
data_source_name: "piggy_bank"

dimension balance {
label: "Balance"
type: "number"
definition: @sql {{ #SOURCE.balance }};;
hidden: false
format: "#,###0.00,,\"M\""

Let us know what you think about this document :)