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:
Any ideas to work around this?
Thanks!