nerdexam
Microsoft

PL-300 · Question #79

You plan to join a fact table named ActivityLog to a Date dimension named ActivityDate. The date value in ActivityLog is a datetime column named ActivityStart. The date value in ActivityDate is a…

The correct answer is D. Create a calculated column in ActivityLog that uses the FORMAT DAX function. Before creating a relationship between a datetime column and a YYYYMMDD integer column, create a calculated column in the fact table to convert the datetime to a matching YYYYMMDD integer format.

Submitted by carter_n· Apr 18, 2026Model the data

Question

You plan to join a fact table named ActivityLog to a Date dimension named ActivityDate. The date value in ActivityLog is a datetime column named ActivityStart. The date value in ActivityDate is a number column named DateID. DateID is in the YYYYMMDD format. What should you do in the model before you create the relationship?

Options

  • AChange the Data Type of ActivityStart to Date.
  • BCreate a measure in ActivityLog that uses the FORMAT DAX function.
  • CChange the Data Type of DateID to Date.
  • DCreate a calculated column in ActivityLog that uses the FORMAT DAX function.

How the community answered

(21 responses)
  • A
    5% (1)
  • C
    10% (2)
  • D
    86% (18)

Why each option

Before creating a relationship between a datetime column and a YYYYMMDD integer column, create a calculated column in the fact table to convert the datetime to a matching YYYYMMDD integer format.

AChange the Data Type of ActivityStart to Date.

Changing the Data Type of `ActivityStart` to Date would still leave `ActivityDate[DateID]` as a YYYYMMDD number, preventing a direct match for a relationship without further transformation.

BCreate a measure in ActivityLog that uses the FORMAT DAX function.

Creating a measure using the `FORMAT` DAX function is for display purposes in visuals and does not create a persistent column that can be used to establish a relationship.

CChange the Data Type of DateID to Date.

While changing the Data Type of `DateID` to Date is a valid transformation, it's generally better practice to adapt the fact table to the dimension, and this option would involve modifying the dimension table, which might not always be desired.

DCreate a calculated column in ActivityLog that uses the FORMAT DAX function.Correct

To create a relationship, the join columns must have matching data types and formats. Creating a calculated column in the `ActivityLog` table that derives a YYYYMMDD integer from `ActivityStart` (e.g., using `YEAR([ActivityStart])*10000 + MONTH([ActivityStart])*100 + DAY([ActivityStart])` or `VALUE(FORMAT([ActivityStart],"yyyymmdd"))`) allows for a direct integer-to-integer join with `ActivityDate[DateID]`, ensuring the relationship can be established correctly for efficient data modeling.

Concept tested: Data type and format alignment for relationships, calculated columns

Source: https://learn.microsoft.com/en-us/dax/calculated-columns

Topics

#Calculated Columns#DAX#Data Type Transformation#Relationship Preparation

Community Discussion

No community discussion yet for this question.

Full PL-300 Practice