Bird
0
0

You wrote this Power Query M code to convert a 'DateText' column to Date type:

medium📝 Formula Fix Q6 of 15
Power BI - Power Query Editor
You wrote this Power Query M code to convert a 'DateText' column to Date type:

Table.TransformColumns(Source, {{"DateText", each Date.From(_), type date}})

But you get an error. What is the most likely cause?
AYou need to use Number.From instead of Date.From.
BDate.From cannot convert text to date.
CThe syntax of Table.TransformColumns is incorrect.
DSome values in 'DateText' are not valid date strings.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Date.From function

    Date.From converts valid text date strings to Date type.
  2. Step 2: Identify cause of error

    If any text value is invalid date format, Date.From throws an error.
  3. Final Answer:

    Some values in 'DateText' are not valid date strings. -> Option D
  4. Quick Check:

    Invalid date strings cause Date.From errors [OK]
Quick Trick: Check text format before Date.From conversion [OK]
Common Mistakes:
  • Assuming Date.From converts any text without error
  • Blaming syntax instead of data quality
  • Using Number.From for dates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes