Knowledge Drop

Why does my date comparison in filters/table calculations lead to an "Invalid filter expression" error?

  • 5 April 2021
  • 0 replies
  • 236 views

Userlevel 5

Last tested: Jan 21, 2019
 

This can happen if you are comparing a LookML Date field with just a date value in quotes " ". For example:

${view_name.created_date}="2015-07-16"

 

While that may work when comparing String values, this will NOT work with dates.

The way to make that a valid date expression in Table Calculations and Custom Filters is:

${view_name.created_date}=date(2015,07,16)

 

Note the use of the date( ) function.

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply