Totals don't adhere to Liquid conditions in SQL definition

The ‘totals’ calculation in the Explore view generates a separate SQL query that doesn’t take into account the Liquid conditions set in the measure definition.

Below is a simple example to replicate this:

dimension: test_dimension {
sql: "test" ;;
type: string
}

measure: test_measure {
sql: {% if test_dimension._is_selected %}
100
{% else %}
500
{% endif %} ;;
type: number
}

The result:

1ee06eb0-49cb-43ea-ae82-a2f2d511f4a4.png

Any ideas to work around this?

Thanks!

8 3 163
3 REPLIES 3

This needs to be fixed ??

I’m having the same issue..

been like this for ages sadly!

Top Labels in this Space
Top Solution Authors