Month and Year multiselect

I am trying to filter per month and year. Our data is mainly budgeting, which is set at the first of every month. Thus a specific date - date filter is of no use.

A solution would be multiselect on the current "Month and Year" date filter, but this is not possible at the moment.

An idea I have is for when my front-end loads the dashboard, to pass into the URL a standardized date at the first of the month, and last of the month for a period. The only action a customer then has to perform, is to change the year / month.

Any other suggestions on how to tackle this are very welcome!

why don't you have the month and the year separated in 2 columns?

Possible, but wouldn't I then need 4 filters to filter? start year / start month and end year / end month

I mainly switched to timestamps because metabase handles them much better in GUI.
But yes, your solution would work. Was just hoping it was possible and to keep my current structure

Then try with a field filter and choose in a dashboard a date filter that suits your needs :grinning:

You could consider creating a date dimension table in your database then join to that on your date field, either in the data model or the question builder. You've then got access to the year and month as separate fields for filtering etc.

Makes for a really flexible solution to this sort of problem, and it's available wherever you use your data, not tied to Metabase functionality.

You can add all sorts of custom fields to it to suit your specific needs, our organisation does some reporting 3 times a fiscal year, so our date dimension has a concept of "Fiscal Third" baked into it. Works pretty well.

Thanks for the replies. Since we work with a datawarehouse making changes to the structure is not a problem.

I now have 2 seperate tables, one for year and one for month with relations to the important tables.
However, now I would like to have 4 filters
Year start (eg 2021) month start (eg Januari) year and (eg 2022) and finally month end (December) and then all the records in between these metrics. But I am having trouble with field filters.

I can't seem to use "BETWEEN" with field filters. Is there another solution that I'm missing, or perhaps with the GUI?


between does not work with field filters