Create Data Tables in Power BI Desktop

  1. Home
  2. Create Data Tables in Power BI Desktop

We shall describe about  good design practices to create date tables in your data models. Therefore, in order to work with Data Analysis Expressions (DAX) time intelligence functions, there’s a prerequisite model requirement: Further, you should have at least one date table in your model. Now, a date table is a table that meets the given requirements –

  • Firstly, it must have a column of data type date (or date/time)—known as the date column.
  • Secondly, the date column must contain unique values.
  • Thirdly, the date column must not contain BLANKs.
  • Also, the date column must not have any missing dates.
  • Then, the date column must span full years (not necessarily a calendar year)
  • Next, the date table must be marked as a date table.

Techniques to add a Date table to your model

  • The Auto date/time option: The Auto date/time option delivers convenient, fast, and easy-to-use time intelligence. Moreover, reports authors can work with time intelligence when filtering, grouping, and drilling down through calendar time periods. The Auto date/time option enabled only when you work with calendar time periods, and when you have simplistic model requirements in relation to time. However, it doesn’t support a single date table design that can propagate filters to multiple tables. 
  • Power Query to connect to a date dimension table: Now, when your data source already has a date table, you are suggested to use it as the source of your model date table. It’s typically the case when you’re connecting to a data warehouse, as it will have a date dimension table. You can then use Power Query to connect to the date table. In this manner, your model calculations can leverage the DAX time intelligence capabilities.
  • Power Query to generate a date table: You can generate a date table using Power Query. Further, if you do not have a data warehouse or other consistent definition for a time in your organization, consider using Power Query to publish a dataflow. 
  • DAX to generate a date table: You can generate a date table in your model by creating a calculated table using either the CALENDAR or CALENDARAUTO DAX functions. Such that, each function returns a single-column table of dates. Also, you can then extend the calculated table with calculated columns to support your date interval filtering and grouping requirements.
  • DAX to clone an existing date table: In case your model has a date table already and you need an additional date table, then you can easily clone the existing date table. In this case, the date is a role-playing dimension. Now, you can clone a table by creating a calculated table. The calculated table expression is simply the name of the existing date table.
Microsoft Exam DA-100 Free Practice Test
Menu