Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
Apologies if this specific instance has been answered before but I couldn't find the problem when I searched the forums.
I have imported an excel spreadsheet into Power BI to make a simple report, and I am trying to convert the following column from a number to a date
However, when I go to Change Type -> Date it gives me the following error:
Would anyone have any idea why this is?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
Try this in a new custom column:
#date(
Number.From(Text.Start(Text.From([assignment_start]), 4)),
Number.From(Text.Range(Text.From([assignment_start]), 4, 2)),
Number.From(Text.End(Text.From([assignment_start]), 2))
)
I get the following output:
Pete
Proud to be a Datanaut!
Power Query understands this format if you're converting from text but not from an integer, so another approach is to transform the column like this:
Table.TransformColumns(#"Prev Step", {{"assignment_start", each Date.From(Text.From(_)), type date}})
Hi @Anonymous ,
Try this in a new custom column:
#date(
Number.From(Text.Start(Text.From([assignment_start]), 4)),
Number.From(Text.Range(Text.From([assignment_start]), 4, 2)),
Number.From(Text.End(Text.From([assignment_start]), 2))
)
I get the following output:
Pete
Proud to be a Datanaut!
This worked, thank you so much Pete!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.