View the original community article here
Last tested: May 14, 2020
The Problem
You're trying to check if a boolean is true or false, but you get a variable not found error, if your boolean is false.
This happens in some dialects that support booleans as true/false values because a value of false, similar to null/nil, is actually the absence of a value, so liquid has no value to check against.
Example LookML that could cause this:
dimension: falsey {
type: string
sql: false ;;
html: {% if value == true %}
style
{% else %}
other style
{% endif %}
;; }
A Solution
Use a yesno dimensions instead, or check against the rendered value (or both!)
dimension: falsey {
type: yesno
sql: case when false then no else 'yes' ;;
html: {% if rendered_value == 'yes' %}
style
{% else %}
other style
{% endif %}
;; }
This content is subject to limited support.