Date Filter Not filtering current date records after 15th March 2021

Report time zone of my metabase is US/Central.
I added "Date Filter" with all option and ticked "Include today" option.
Then I used report variable in my sql query and it is bound the Date filter of my Dashboard. After that it worked as we expected.
But last week my customer complained that dashboard is not filtering current date records since15th March 2021.

When I investigated the issue, I found that Dashboard filter is not getting current date until our evening time.
So all changes within the day will be reflected in the evening.

Could some one please help me to resolve this issue?

Sample SQL report
select * from vw_clock_12_hours
[[WHERE {{ completed_at }}]]
order by date desc

SQL query for the view
CREATE OR replace view vw_clock_12_hours AS
select 'now' as row, getdate() as date
union
select '1 hour before' as row, dateadd(hour, -1, getdate()) as date
union
select '2 hour before' as row, dateadd(hour, -2, getdate()) as date
union
select '3 hour before' as row, dateadd(hour, -3, getdate()) as date
union
select '4 hour before' as row, dateadd(hour, -4, getdate()) as date
union
select '5 hour before' as row, dateadd(hour, -5, getdate()) as date
union
select '6 hour before' as row, dateadd(hour, -6, getdate()) as date
union
select '7 hour before' as row, dateadd(hour, -7, getdate()) as date
union
select '8 hour before' as row, dateadd(hour, -8, getdate()) as date
union
select '9 hour before' as row, dateadd(hour, -9, getdate()) as date
union
select '10 hour before' as row, dateadd(hour, -10, getdate()) as date
union
select '11 hour before' as row, dateadd(hour, -11, getdate()) as date
union
select '12 hour before' as row, dateadd(hour, -12, getdate()) as date

My Test Dashboard
As per the dashboard, it takes only 2021-03-21 records even today is 2021-03-22.

Hi @smanpre
Please post "Diagnostic Info" from Admin > Troubleshooting, and which database you are querying.
Sounds like you are seeing this issue:
https://github.com/metabase/metabase/issues/11819 - upvote by clicking :+1: on the first post

1 Like

Diagnostic Info - above report uses redshift database

{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0",
"vendor": ""
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.7+10",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "https://adoptopenjdk.net/",
"java.version": "11.0.7",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.7+10",
"os.name": "Linux",
"os.version": "4.14.193-113.317.amzn1.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"postgres",
"redshift"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "11.10"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.8"
}
},
"run-mode": "prod",
"version": {
"date": "2020-10-09",
"tag": "v0.36.7",
"branch": "release-0.36.x-with-new-build-scripts",
"hash": "ec751f0"
},
"settings": {
"report-timezone": "US/Central"
}
}
}

@smanpre Then it sounds like you're seeing that issue, since Redshift and Postgres are very similar.
Latest release is 0.38.2

1 Like