Microsoft Certified: Power BI Data Analyst AssociateModel the dataMedium

A data modeler is optimizing a Power BI model for a large enterprise. The model contains a 'Sales' fact table and several dimension tables. The 'Sales' table has a 'DateKey' column which is an integer representing the date (e.g., 20230101). This 'DateKey' is related to the 'Date' dimension table's 'DateKey' column. The modeler notices that many DAX calculations involving dates are performing slowly, especially when filtering across long date ranges. What is a common optimization strategy for date dimensions in such scenarios?

  1. AReplace the 'DateKey' integer column with a DateTime data type in the 'Sales' table.
  2. BEnsure the 'Date' table is marked as a date table in the Power BI model.
  3. CConsolidate the 'Date' dimension table into the 'Sales' fact table to reduce joins.
  4. DChange the relationship to 'DateKey' from single-directional to bi-directional.
Show answer & explanation

Correct answer: B. Ensure the 'Date' table is marked as a date table in the Power BI model.

Marking the 'Date' table as a date table in Power BI is crucial for enabling optimal performance of DAX time intelligence functions. It allows the VertiPaq engine to apply specialized optimizations for date-related calculations and filter propagation.

Why the other options are wrong

  • A. Replacing an integer 'DateKey' with a DateTime data type in the fact table would increase storage size without necessarily improving time intelligence performance, as the date dimension is still separate.
  • C. Consolidating the 'Date' dimension into the 'Sales' fact table would flatten the model, potentially increasing the size of the fact table and losing the benefits of a star schema for date filtering and analysis.
  • D. Changing to a bi-directional relationship is generally discouraged for performance and complexity reasons, especially for dimension tables, as it can lead to ambiguous filter paths and slower queries.

Mark as Date Table

A setting in Power BI Desktop that designates a specific table as the primary date table for the model, enabling optimized time intelligence calculations.

  • Crucial for DAX time intelligence function performance.
  • Requires a continuous range of unique dates.
  • Allows VertiPaq to apply specific optimizations for date filters.

Memory trick: Mark your dates for speed, don't complicate the schema.

More Model the data questions