Knowledge Drop

How do I require a filter/field if another field is selected?

  • 5 April 2021
  • 0 replies

Userlevel 5
  • Looker Staff
  • 172 replies

Last tested: March 2021


There is no way to bring filters or fields into the UI conditionally.

However, there are workarounds for affecting the generated SQL.

Bringing filter SQL into the WHERE Clause

If you want to put something into the WHERE clause if a field is selected, you can use a sql_always_where statement. This supports liquid such as `{% if field_name._is_selected %}`.

Bringing a field into the SELECT Clause

The LookML parameter called "required fields" brings in other fields to the generated SQL when this field is selected.


This content is subject to limited support.                

0 replies

Be the first to reply!