Truncate based on dropdown filter

Hi,

Looking to have a custom dashboard where the truncates of date can be selected via dropdown

SELECT DATE_TRUNC(sample.date, {{date}})
from sample

Is it possible to select the text in a query based on a dropdown? Possibly [DAY,WEEK,MONTH]

Hi @natti
If you need a dropdown, then you need to have a lookup table with the options, and would require other workarounds because it's a Field Filter.
I would recommend just using a Text variable like described here: https://github.com/metabase/metabase/issues/6583#issuecomment-541742278