Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Using Power Query, can I convert a text or number column to a Month in Calendar (date) column? The data look like this:
Solved! Go to Solution.
Hi @MojoGene
As AlB said, if you have a [year] column, then use this formula
#date([year], [MonthNumber], 1)
Best Regards
Maggie
Hi @MojoGene
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
Cheers
Thanks. That works for 2020. Can hard-coding the year be avoided?
Hi @MojoGene
As AlB said, if you have a [year] column, then use this formula
#date([year], [MonthNumber], 1)
Best Regards
Maggie
Sure, as I said in the previous post, update the year or day with whatever is required
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
Cheers
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
41 | |
23 | |
21 | |
20 | |
13 |
User | Count |
---|---|
128 | |
58 | |
48 | |
28 | |
20 |