The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello all;
I am trying to create a target table. On my table, we have a 3 letter initial for the month (period) that contains target qouta for the month. PowerBI treats this column as text instead of Date. I am wondering what do i need to do to covert this field to date. I receive an error when I convert it using Power BI.
Thanks in advance for your help
Andrew
Solved! Go to Solution.
I assume you have a year field somewhere, or you can hard code it. There are probably lots of ways, but the way I would do it is to add a new column in power query, and put in a formula like this
"1-" & [MonthNameColumn] & "-2016"
Then change the data type of the new column to "Date" from the menu and it should work.
Of course flip the month and day portion if you need the US date format
Hi @AndrewDang,
After creating a new column suggested by @MattAllington, then you can convert the column to date type in specified date format.
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
Hi @AndrewDang,
After creating a new column suggested by @MattAllington, then you can convert the column to date type in specified date format.
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
Thanks @MattAllington and @v-qiuyu-msft
I will give it a try today and keep you posted if I run into any issue.
Have a great day.
Andrew
I assume you have a year field somewhere, or you can hard code it. There are probably lots of ways, but the way I would do it is to add a new column in power query, and put in a formula like this
"1-" & [MonthNameColumn] & "-2016"
Then change the data type of the new column to "Date" from the menu and it should work.
Of course flip the month and day portion if you need the US date format
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
74 | |
52 | |
50 |
User | Count |
---|---|
132 | |
124 | |
78 | |
64 | |
61 |