Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey everyone!
I am trying to create a column with just the month and the year of a date, so later on I can group the data as I want.
I am using the following line:
= Table.AddColumn(Source, "MonthInCalendar", each Date.ToText([Created], "MMM yyyy"))
But it gives me the following error:
Expression.Error: We cannot convert the value #datetime(2019, 3, 11, 13, 35, 30) to type Date.
Details:
Value=11/03/2019 13:35:30
Type=[Type]
It is weird because I have been abe to use this before in similar cases without any errors. Is there something I should change in that line for this particular case?
Thanks in advance!
Solved! Go to Solution.
Instead of Date.ToText try DateTime.ToText
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |