New LookML breaks cell HTML colour format

Problem: in 19 days, a Looker upgrade will be performed in my instance, and the HTML/Liquid rendering for heatmap reporting will stop working.

juliantaboola_1-1705425526216.png

We currently have several dashboards that use HTML and Liquid to colour cells in a table, emulating a heatmap on a column basis. 

I am aware of the built in functionality of conditional formatting, but this applies to the entire table, and I need to split the colour coding on each column. This is not what I'm after.


Example, for each row, colour code the lower values with red and the highest value with green.

Result:

juliantaboola_0-1705425485777.png

See simplified example below from the LookML.

 

 

 

html:
{% assign factor9=mean._value | divided_by: std_dv._value | times: 0.9 %}
...
...
{% if m_std_clc._value > factor9 %}
      <div style="color:white; background-color: rgb(33, 95, 33);">{{ rendered_value }}</div>
....
....
{% else %}
<div style="color:black; background-color: lightgoldenrodyellow;">{{ rendered_value }}</div>
{% endif %} ;;

 

 

 

If I disable the Legacy LookML, the heatmap defaults to `lightgoldenrodyellow`.

How could I fix this before my instance gets upgraded? Thank you

1 1 69
1 REPLY 1

I also need a feature to enable "conditional formatting, which applies to the entire table, and I need to split the colour coding on each column. " featurerequest productmanagement

Rif - Staff Analytics Engineer & Google Developer Expert

Top Labels in this Space
Top Solution Authors