Trend Chart doesn't work with previous week, just current

The Trend chart doesn't work with previous week, just the current one.


Would be possible to make it works?

I have a similar issue where certain days work and certain days don’t. I have casted the date column correctly as well.

@dragonsahead any ideas?

Make sure the query is providing data for the dates & date ranges indicated. If your query has a date range of ‘last two weeks,’ it can’t tell you what was happening last month.

You may need to handle any missing data using COALESCE(), etc., to avoid any NULL values being returned from arithmetic.

hi Doug,

check and check :white_check_mark:

Data exists in my case for 22.10.2025 and shows up in other charts, just the trend chart is unable to pick that up.

Is it ALWAYS and ONLY the ‘30 days ago’ filter that says no data? Can you try setting the question filter to pick out just that day and make sure it returns data in the table view? And that the data returned is an integer? What happens if you change the comparison to other lengths, like 29 or 31, or 14?

Can you reproduce this issue with the Sample Database?

Here’s another thing. At least in v57 in my install (with US locale), I can’t set the date to your format, with dot separators. It will only let me set date formats with slashes. How did you get your install to use dots? (Java locale might impact this.)

I’m wondering if that date format is coming from the query result and Metabase isn’t interpreting the result data as datetimes, which will break the filtering. But that should break the 365 day comparison in the same way, if that’s true.

Finally, what database are you querying? Mostly checking if its a schemaless database like MongoDB here, I don’t think you could get type problems from common RDBMS.

I believe this is the issue here : Trend Chart doesn't Recognize "Previous Week" data exists in Some Cases · Issue #65568 · metabase/metabase · GitHub

resolved in v57