Looker explore question

Hi, 

I’m building a dashboard on looker which calculates previous period which is displayed on a tile just below the metric, the issue I have is, when I proceed to edit the tile, the backend sql errors but the tile previous period front end works.

The error I’m getting is “Operands of >= cannot be literal NULL”, the sql that’s failing “WHEN SAFE_CAST(columnname.date_date AS TIMESTAMP) >= NULL”

I assuming it’s working based on a date filter on the dashboard when it’s selected and it updates the null value but shouldn’t the NULL be a variable instead of NULL?

I’m trying to replicate this on another tile but it’s not working at all.

Thanks.

1 1 218
1 REPLY 1

NULL doesn’t work with >,=,<  you have to use “IS NOT NULL” → SAFE_CAST(columnname.date_date AS TIMESTAMP) IS NOT NULL

Top Labels in this Space
Top Solution Authors