HI, I have created a SQl question and have used field filter in the same.
While the filter works, but it retrives partial data.
PFA screen captures below with the description. Need an assistance on the same to solve this issue.
You’re not comparing the filter values to anything.
Shouldn’t you be comparing the filter to a column in the database.
Your SQL is just returning:
AND ‘2018-02-07’
instead of
AND table.columnName = ‘2018-02-07’
This smells like a timezone bug, or perhaps related to the issue where we’re incorrectly appending a time value to dates that don’t have one (I’m seeing a lot of 12:00 AM in your dates).
You’re not comparing the filter values to anything.
Shouldn’t you be comparing the filter to a column in the database.
Your SQL is just returning:
AND '2018-02-07’
instead of
AND table.columnName = ‘2018-02-07’
Unless there’s some weird SQL syntax here.
This syntax is correct when using Metabase's field filters. That syntax is actually inserting a whole SQL clause, rather than just a single value. That's what enables things like date range filters, or category value dropdown filters. See here:
@maz The field filter (date range) is mapped to ‘creation_date’ whose data type is timestamp in my database (mysql). Is this the issue? Any solution for this?