HTML adding up and down arrow to value to cells on table viz

Knowledge Drop

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.                

Version history
Last update:
‎07-07-2021 01:13 PM
Updated by: