Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure DataStudio filter control to have a default selection of null?

I have a DataStudio chart of type table and a filter control both connected to the same datasource. The filter control references a dimension that can contain empty values. When applying a filter (by manual selection), the empty values appear as null and the table is filtered as expected.

My goal is to apply a default selection to the filter control so that empty values are included by default. The filter control allows me to provide a comma separated list for the default selection, however:

  • If I use the text null, it is treated as the text literal null. The same is true for (null) which is treated as the text literal (null).
  • If I use a leading comma (,filter), or a trailing comma (filter,), it is treated as filter and "" which doesn't match null.

The question is, how do I get a filter control's default selection to match results where the value is null/doesn't exist (by default)?

like image 407
Soc Avatar asked Jan 25 '26 12:01

Soc


1 Answers

Edit (Apr 2022): As pointed out by @simplycoding below, this is now available by selecting a filter - Data - Control Field - Default selection.

Original Answer: This is currently not possible (Dec 2019). A workaround could be to create a calculated field where null values from the original column are replaced with a predefined value. Then filter based on the new column.

like image 78
Minhaz Kazi Avatar answered Jan 28 '26 19:01

Minhaz Kazi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!