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

Knowledge Drop

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.                

Version history
Last update:
‎04-05-2021 09:07 AM
Updated by: