Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
rbbi
Advocate II
Advocate II

Date table(s) - why are they needed? and problems they bring with links/loops

I've read some other discussions of this but I'm trying to get a more definitive answer ...

I completed the EDX course "Analyzing and Visualizing Data with Power BI" and the demos and exercises there had a date table linked to a date column in the fact table.

But in real life the fact table(s) may have more than one date column, and dimension tables may also have one or more date columns.

So my question is: Why have a date table at all?

To elaborate ... doesn't (or shouldn't) Power BI provide enough functionality on date columns to make a separate date table unnecessary?

It would be really nice to just have date columns and not need date table(s).

If a separate date table is really needed, I can't have just one date table, because if the fact table has more than one date column, I can only link one of these to the date table, So I need a separate date table for each date column in the fact table. And if dimension tables also have dates, I can't link these to any date table that's linked to the fact table, because that will create loops!

The conclusion is that if I do need a separate date table to get the date processing functions required, then I really need one date table for every date column in the model that I want to be able to process as a date .. seems very inefficient to me in time, storage and maintenance.

 

thanks

1 ACCEPTED SOLUTION
rbbi
Advocate II
Advocate II

Thanks for your reply Matt. Some good insights there.

So it seems I'm right that in the current release I need date tables for all date columns that I wish to process as dates, one per column to avoid loops in the model. But I think this only applies if I want to have more than just the default hierarchy of dates that PBI already provides (like fiscal year). And I found some information (further below) that might even make that unnecessary!

 

I disagree a bit though on the contiguous nature of raw dates (i.e. without linked date columns). I have a simple test model that has sale dates and amounts in 2015, 2016 and 2018 (note: none in 2017!) and a couple of charts show up very nicely showing the proportional spread of these dates. The top one uses the date hierarchy automatically provided, the lower one is switched to just the date.

SaleDates.JPG

 

I also found some good info in a recent presentation here, which explains this and points to future developments ...

https://www.youtube.com/watch?v=RiHpkN0gfPM

 

At 38min30sec he starts talking about calculated calendar tables that automatically populate to the date ranges present in your data.

Then at 42min15sec he runs Power BI in a special mode that shows 'hidden' date template tables that are present all the time and are automatically linked to all date & datetime columns! Seems these are going to be exposed to us in future releases, at least the template structure(s) so that they can be customised with things like fiscal year definition and any other date processing we need. This will make using our own date tables unnecessary.

 

cheers, Rod

View solution in original post

2 REPLIES 2
rbbi
Advocate II
Advocate II

Thanks for your reply Matt. Some good insights there.

So it seems I'm right that in the current release I need date tables for all date columns that I wish to process as dates, one per column to avoid loops in the model. But I think this only applies if I want to have more than just the default hierarchy of dates that PBI already provides (like fiscal year). And I found some information (further below) that might even make that unnecessary!

 

I disagree a bit though on the contiguous nature of raw dates (i.e. without linked date columns). I have a simple test model that has sale dates and amounts in 2015, 2016 and 2018 (note: none in 2017!) and a couple of charts show up very nicely showing the proportional spread of these dates. The top one uses the date hierarchy automatically provided, the lower one is switched to just the date.

SaleDates.JPG

 

I also found some good info in a recent presentation here, which explains this and points to future developments ...

https://www.youtube.com/watch?v=RiHpkN0gfPM

 

At 38min30sec he starts talking about calculated calendar tables that automatically populate to the date ranges present in your data.

Then at 42min15sec he runs Power BI in a special mode that shows 'hidden' date template tables that are present all the time and are automatically linked to all date & datetime columns! Seems these are going to be exposed to us in future releases, at least the template structure(s) so that they can be customised with things like fiscal year definition and any other date processing we need. This will make using our own date tables unnecessary.

 

cheers, Rod

MattAllington
Community Champion
Community Champion

A date/calendar table is just another dimension table. Dimension tables are used to save space and make everything work more effectively (among other things). So instead of having date, day name, month name, month number, year, day number, quarter, etc etc in your fact table (which is inefficient), you abstract all these attributes into a dimension table. 

 

Also, inbuilt time intelligence requires a date table that meets certain rules - eg contiguous ranges. Fact tables don't have to meet these rules, so the calendar table is needed to provide consistent structure. 

 

You don't need a calendar table for each date column in your fact table. You only need it if you want to use time intelligence functions or want to access dimension columns. 

 

You may like to read my blog post on this topic here. http://exceleratorbi.com.au/power-pivot-calendar-tables/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.