ERROR: Cannot cast expressions from type `timestamp with time zone` to type `date`

Hello everyone,

I am getting this error everytime I try to filter in the browse data by the column timestamp. It doesn't work when I filter by Today, Yesterday, Last 7 Days since I am always getting this error.
I want to have the power of letting the user click on a filter that is today and all the dashboard update according to today's data.
The work around I found was :
SELECT
COUNT(*) AS "Total Transactions"
FROM

WHERE ------
[[and {{tx_outcome}}]]
[[and {{tx_outcome_type}}]]
[[and "table"."timestamp" AT TIME ZONE 'UTC' >= CAST ({{date_start}} AS date)]]
[[and "table"."timestamp" AT TIME ZONE 'UTC' <= CAST ({{date_end}} AS date)]]

The problem with this solution is that it's not very friendly since the user needs to manually select the dates he wants to see the data filtered by. Do you guys have any ideas of how could I solve this issue?

Thanks in advance :smiley:

can´t you change the data type from the original to the one that Metabase uses for comparing?

The only problem is that I don't want to loose the detail of the timestamp with time zone since its being used to calculate another metrics :frowning:

Can’t you make a derived column or make a view to add a new column?