Why wouldn’t a value_format_name or value_format apply to my field?

Knowledge Drop

Last Tested: Dec 5, 2019

Without a type parameter, a field type defaults to string. You need to add type: number in most cases where this happens.

You should change this:

measure: ratio_of_cases_to_accounts {

value_format_name: decimal_1

sql: 1.0 * ${count} / ${accounts.count} ;;

}

to this:

measure: ratio_of_cases_to_accounts {

value_format_name: decimal_1

type: number

sql: 1.0 * ${count} / ${accounts.count} ;;

}

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 03:32 PM
Updated by: