Skip to main content
Microsoft Idea

Power BI

Under Review

Automated Date Table generation

Vote (106) Share
Eric Hutton's profile image

Eric Hutton on 06 Jan 2015 01:27:45

It would be nice to have a tool for automatically generating a date table - there are lots of sample SQL code and M code out there for doing so, but it would still be nice to have a built-in facility for this.

Administrator on 23 Jan 2015 06:25:21

Good suggestion Eric, thanks! If others think it'd be helpful, please add your votes!

Comments (10)
Eric Hutton's profile image Profile Picture

Andrew Humphrey on 05 Jul 2020 23:49:04

RE: Automated Date Table generation

PowerPivot has this feature already. Can't understand why PBI doesn't have it as well. Hopefully it would be relatively easy to add since the two products seem to be very closely related.

Eric Hutton's profile image Profile Picture

Power BI User on 05 Jul 2020 22:32:52

RE: Automated Date Table generation

it would also be nice to have the ability to set timezone and current date for running WTD, MTD, QTD, YTD Calculations

Eric Hutton's profile image Profile Picture

Rozack on 05 Jul 2020 22:27:12

RE: Automated Date Table generation

I think this a very good suggestion and can be done quickly as well. Currently we create the DimDate in SQL server and then import the same here. Similar tool is also available in Excel as an Add-on.

In PowerBI tool should be able to do the following:
1. Select the Date Range or Auto Generate based on some Date field
2. Allow the user to define Financial Year,
3. Add Granular Columns such are Day of Week, Day of the year, Month Name, etc... ( some functions already there in Edit Query > Date & Time
4. Define Start of the Week & Define Weekends
5. Attach a Holiday Calendar
6. Add Time Buckets
7. Add AM / PM or 24 Hour Periods
Once all these functions are developed the user can click on Generate the table & the system can detect relations in a popup menu and select/de-select and save.

Eric Hutton's profile image Profile Picture

Power BI User on 05 Jul 2020 22:22:28

RE: Automated Date Table generation

It would be nice to have this automatically generated date table to expose a default hierarchy so we can use it immediately

Eric Hutton's profile image Profile Picture

Hila Galapo on 05 Jul 2020 22:18:17

RE: Automated Date Table generation

My main problem with the current date hierarchy that it can't be modified. I'm in Australia where the Financial Year starts July 1st. Also, sometimes you'd like to label your Date data

Eric Hutton's profile image Profile Picture

Brad on 05 Jul 2020 22:17:27

RE: Automated Date Table generation

Yes, love this idea, still feels awkward to create a continguous dates table for the time intelligence features to work

Eric Hutton's profile image Profile Picture

Chimene B on 05 Jul 2020 22:17:13

RE: Automated Date Table generation

A lot of my customers want a Fiscal Year function available as well as a GetDate () functionality. E.g. Fiscal year, FY to Date, Current date to FY, Past FY. In addition, day and month filters e.g. next/past 30/90/180 days.

Eric Hutton's profile image Profile Picture

Joana Power BI User on 05 Jul 2020 22:08:59

RE: Automated Date Table generation

It would be better if we didn't need a date table and could group dates by months, quarters and years like we do in pivot tables

Eric Hutton's profile image Profile Picture

Tristan Cook on 05 Jul 2020 22:03:43

RE: Automated Date Table generation

Its great that you can already generate a list of numbers but doing the same for dates , including Month Names, Day Names and week numbers would cut down a lot of the code I have to write or reduce the need for a seperate time Index table

Eric Hutton's profile image Profile Picture

Michael Grimm on 05 Jul 2020 21:58:00

RE: Automated Date Table generation

I agree, this is a very repetitive task that should just be configurable.