Time filters on a dashboard not working for a single-number linked query

Dear all,
I have a dashboard with a native SQL query and custom questions based on it. One of these custom questions is a total revenue number, i.e. a single-number chart. I want to restrict period of time using dashboard time filters. The problem is that I cannot apply them to this total revenue chart.

The way the native SQL query is built is as follows:
payment_date revenue
12.03.2020 40$
15.03.2020 30$
13.04.2020 50$

The revenue chart is a custom question based in this query, i.e. sum(revenue).
I want to enable from and until time filtering but it does not work. I am wondering if this feature is plainly not available or whether I am mistaken in some part. Would appreciate a comment.

Hi @pavelsson
That doesn’t look like DATE types, but STRING, which Metabase won’t be able to handle, so if you cast it as date, then it should work, but I have a feeling that you might be seeing one of the issues, which is fixed in the upcoming 0.36.0 release, where you cannot use filters on questions which are based on a Saved Question.

Hi @flamber, thanks for a quick reply! So the payment_date field is definitely a date type - I can see it in the editor as it is marked with a small calendar logo. Do I understand correctly the 0.35.4 release does not allow dashboard filters for custom questions based on a Saved Question (native SQL)?

@pavelsson Okay, it was just that you added zeros in the month, which Metabase currently doesn’t have as a formatting option.
Correct, any versions before 0.36.0 will not be able to use dashboard filters on questions based on Saved Questions - it will just say “No valid fields”. There’s so many big and small fixes coming in 0.36.0 that I have almost lost count.

1 Like