Microsoft Certified: Power BI Data Analyst AssociatePrepare the dataEasy

A data analyst is working with a sales dataset in Power Query. The dataset includes a 'TransactionDateTime' column that contains both date and time information. The analyst needs to create a new column that only shows the date part (e.g., 'YYYY-MM-DD') for reporting purposes, discarding the time component. Which Power Query transformation should be used?

  1. ATransform > Time > Hour
  2. BTransform > Date > Start of Day
  3. CAdd Column > From Text > Parse
  4. DAdd Column > Date > Date Only
Show answer & explanation

Correct answer: D. Add Column > Date > Date Only

The 'Date Only' transformation under 'Add Column > Date' specifically extracts only the date portion from a date/time column, creating a new column with just the date.

Why the other options are wrong

  • A. Hour extracts only the hour component, which is not what is required (date only).
  • B. Start of Day would retain the time component, setting it to 12:00:00 AM, not remove it entirely for a date-only column.
  • C. Parse from text is used to convert text into a date/time format, not to extract parts from an existing date/time column.

Extract Date Only (Power Query)

A Power Query transformation that extracts only the date component (year, month, day) from a date/time column and creates a new column containing just the date.

  • Found under 'Add Column > Date'.
  • Useful for reporting or grouping by date without time.
  • Original column remains unchanged.

Memory trick: For dates and times, add or transform, parts you'll find, keep data warm.

More Prepare the data questions