View the original community article here
Last tested: June 2020
If you use a filter field, then you can specify which measures should listen to that filter field using templated filters.
This Help Center Article explains it well; here are the code examples from that article.
filter: status_filter {
type: string
}
dimension: status_satisfies_filter {
type: yesno
hidden: yes
sql: {% condition status_filter %} ${status} {% endcondition %} ;;
}
measure: count_dynamic_status {
type: count
filters: {
field: status_satisfies_filter
value: "yes"
}
}
This content is subject to limited support.