Hi!
Is it possible to use only a part from a information from a field filter?
My case: I want to use only the year information from the date filter:
WHERE YEAR = DATE_FORMAT({{FULL_DATE}}, "%y")
Hi!
Is it possible to use only a part from a information from a field filter?
My case: I want to use only the year information from the date filter:
WHERE YEAR = DATE_FORMAT({{FULL_DATE}}, "%y")
Hi @Helena
No and yes. You don't control Field Filters - Metabase controls the code for that.
Please read this: https://www.metabase.com/learn/sql-questions/field-filters
Your example should probably just use a Number filter instead.
Alternatively, you can use a sub-select:
WHERE YEAR = (select DATE_FORMAT(date_column, "%y") from table where {{FULL_DATE}} limit 1)