There is a date column in my SQL table. This is formatted as follows: yyyy-mm-dd
However, there are also entries with NULL or 0000-00-00. This results in the following error:
How can I correct this in Looker?
Thank You
There is a date column in my SQL table. This is formatted as follows: yyyy-mm-dd
However, there are also entries with NULL or 0000-00-00. This results in the following error:
How can I correct this in Looker?
Thank You
You might consider to either define a different SQL statement that ensure you return only valid dates or define the field as a string field and use Looker Studio functions to derive valid dates as custom fields
Hey Samdon,
Using the SQL parameter in your LookML, you can add an ifnull or a regular if statement to remove these dates from your field. This will be dependant on the date formats you have in your dataset and also will be aligned to the syntax of your underlying database. Here is an example of what that would look like for my sample dates in BigQuery.