Calendar Table


#1

Guys, good afternoon!

How to create and relate a calendar table to be used to filter data based on dates in one or multiple tables?

Regards,
Lourival Oliveira


#2

@LOURIVAL
I’m not sure I understand.
Are you looking for a calendar heatmap visualization? If yes, then go and upvote by clicking :+1:
https://github.com/metabase/metabase/issues/5447


#3

I think he’s looking for a date dimension table.
If so, you need to create a table containing all your dates etc, then create a view for each place you want to use is.
For example, table: masterCalendar
views: SalesOrderPlaceCalendar, SalesOrderInvoiceCalendar etc


#4

Hi @AndrewMBaines,

Exactly this, how do I create this global date dimension table in Metabase and use it in all my dashboards?


#5

It’s nothing to do with Metabase. I needs to be in your database.
This is for SQL Server, but applies to any database:


#6

240/5000
Ah yes, I got it!
I will work with Dashboards from multiple datasources (Mysql, Oracle, DB2 …), in this case, will I need to create a Calendar Table for each DBMS or, do I just need to create this Calendar Table in the Metabase database?


#7

Possibly. Does Metabase’s native date handling not do what you need?


#8

I’m going to conduct tests here and for any questions I’m about to report to you again. Thank you for your attention.

Regards,
Lourival Oliveira