Knowledge Drop

Conditional / Dynamic Value Format value_format

  • 5 April 2021
  • 1 reply
  • 862 views

Userlevel 5

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.                

 

 


1 reply

Userlevel 2

This is great but the issue we’re running into is the currency symbol doesn’t show on axis value labels or series value labels.

Reply