Conditional Liquid Filter with HTML

Using the example from the html documentation here

I created a field thus

measure: status {
description: “Are we all good?”
sql: ${precalculated_measure_is_not_good} ;;
html:
{% if value == ‘No’ %}
<p><center><img src=“url_to_checkmark” align=center height=20 width=20></center></p>
{% else %}
<p><center><img \src=“url_to_cancel” height=20 width=20></center></p>
{% endif %}
;;
}

(excuse the weird urls here - y’all won’t let me post multiple ‘links’, and these appear to be interpreted as links.)

Which, for a given group-by, yields one value that works and a lot of errors.

image

Ideally I’d like to have all of these working. What’s going on here?

HI @Maggie ,

I’ve spent an enormous amount of time working with Liquid in Looker and can certainly attest to the strange & brittle nature of its implementation.

While there may be a minor formatting issue in the LookML that you’ve posted, it may also be an issue with the way that the View is joined to the Explore.

I’m happy to help you debug if you’d like to hop on a 15 minute chat.

Best,
Davis

Thank you so much for your reply, Davis! We JUST upgraded to the latest version of Looker, and I need to retry this creation. I will bug you again if this still fails