View the original community article here
Last tested: Jul 30, 2018
dimension: random_value {
label: "random value with html pointers"
sql: rand() ;;
html:
{% if value > 0.5 %}
{% assign indicator = "green,▲" | split: ',' %}
{% elsif value < 0.5 %}
{% assign indicator = "red,▼" | split: ',' %}
{% else %}
{% assign indicator = "black,▬"] | split: ',' %}
{% endif %}
<font color="{{indicator[0]}}">
{% if value == 99999.12345 %} &infin
{% else %}{{rendered_value}}
{% endif %} {{indicator[1]}}
</font> ;;
}
This content is subject to limited support.