Using Power Query, can I convert a text or number column to a Month in Calendar (date) column? The data look like this:
Go to Solution.
As AlB said, if you have a [year] column, then use this formula
#date([year], [MonthNumber], 1)
View solution in original post
You can for instance add a custom column with this code for the column:
= #date(2020, [MonthNumber], 1)
to create the first day that month in 2020. change as required if you want another year or day
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs
Thanks. That works for 2020. Can hard-coding the year be avoided?
Sure, as I said in the previous post, update the year or day with whatever is required
Check out a full recap of the month!
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.