Forum Discussion

PaulKraemer's avatar
PaulKraemer
Advocate II
1 year ago
Solved

Creating my own Date Table

Hi,   I've been trying to learn Power BI using the Microsoft learning paths available through the following link ...   https://learn.microsoft.com/en-us/training/browse/?products=power-bi   ......
  • OwenAuger's avatar
    OwenAuger
    1 year ago

    Hi PaulKraemer 

     

    I would also recommend turning off auto date/time as a general rule, in line with what you've read.

    If enabled, it creates a hidden table for every date column in the model (excluding calc tables/columns), which can significantly bloat the model size and harm performance. 

    I would recommend defining hierarchies yourself in your own Date table, whether created with DAX or Power Query.

     

    As far as how to create the Date table:

    • CALENDARAUTO may work fine in simple models, but because it searches the model for date columns and expands include all years spanning dates in those columns, it may become larger than required.
    • There are various Power Query date table functions online. See here for example.
    • If using DAX, I recommend instead using a pattern similar to this:
      https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
    • You can also use the Bravo external tool to create a date table.
    • If you would like to see an example of a Date table with hierarchies defined, you could download one of these Contoso Data Generator models from here.
      For example download "
      pbix-100k.7z".

    Hope that helps!