Data Studio
6.8K members online now
6.8K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Does 'IS Null' work?

Follower ✭ ✭ ✭
# 1
Follower ✭ ✭ ✭

Just wondering if 'Is Null' actually works?  Simple Case statement;

 

CASE WHEN 'Dimension' = 'Test Data' THEN 'Supplier 1 ' ELSE 'Supplier 2' END 

 

Works a treat. However, put...

 

CASE WHEN 'Dimension' IS NULL THEN 'Supplier 1 ' ELSE 'Supplier 2' END 

 

Doesn't.

 

Any ideas? The source is from Sheets.  I've tried CASE WHEN 'Dimension' = ' ' .... END etc, but no joy.

 

 

 

 

 

 

Does 'IS Null' work?

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

I've answered my own question;

 

CASE WHEN REGEXP_MATCH  ('Dimension' , "" ) Then "Supplier 1" Else "Supplier 2" END

 

Still not sure if 'Is Null' works but the above does.  

Does 'IS Null' work?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I also have never got IS NULL to work. It doesn't autocomplete in the editor like other statements, and there are no tangible examples in the documentation. I'd love to know if it's actually functional, as it would be very useful. Unfortunately your REGEXP_MATCH example also resulted in an "Invalid Formula" error for me.

Does 'IS Null' work?

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

have you tried removing the aggregate on the field that you are using REGEXP_MATCH on? I set it to none, and it worked for me.