How to create a calendar table (date dimension)?


I’ve never created a calendar table and I don’t know how to create one.

Someone helps me?

Depending on your dataset you can do this.

You need two fields.

  1. week_of_month
  2. day_of_week

If you have a date field then you can make these two with these calculated fields.

week_of_month = ceil(extract(‘DD’,{arrival_timestamp})/7)
day_of_week = extract(‘WD’,{date_field})

Then create a pivot table and add the week_of_month to the rows and the day_of_week to the columns.

Hi @juduk
We hope Max’s solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution.”