View the original community article here
Last tested: Jan 21, 2019
We can't do dynamic formatting using the value_format
parameter, but we can using the html
parameter! Here is an example that looks at a separate "currency" dimension and puts the proper symbol in front of our measure amount.
html:
{% if currency._value == 'EUR' %}
€{{rendered_value}}
{% elsif currency._value == 'USD' %}
${{rendered_value}}
{% else %}
{{rendered_value}}
{% endif %}
;;
This content is subject to limited support.