Knowledge Drop

How do I get a measure to listen to one filter and not another?

Userlevel 5
  • Looker Staff
  • 172 replies

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.                

0 replies

Be the first to reply!