Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
swebb
Helper II
Helper II

Calendar dates issue

All,

 

I have imported data from Dynamics Business Central to Power BI and I'm having some challenges with the dates. I exported financial data in Excel format from BC, but when I imported in to Power BI, I had to do some data transformation. When doing this, I was unable to set the months as date. I'm not sure why. If anyone has any guidance here, or knows a way to keep the associations with the rest of the data and have a working month column, please let me know. TIA.

 

Edit: Sorry, I don't know if this was very clear or not. Let me try to clarify. When I did my transpose, I ended up with a column corresponding with some financial data that represented totals for each month. The "month" column was set as text and I could not convert it from text to date data type. It just threw a generic error saying it could not convert the data type. I need a solution to pair the month with those totals for each item on the financial report. I hope this made more sense than my original post. Thanks.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @swebb 

 

A date value is composed with Year, Month, Day. If your Month column only contains month names like "January"/"Jan", it cannot be changed to Date as it doesn't provide valid Year or Day for the month. You need to concatenate the month with Year and Day, then convert the new column to date type. 

For example, add a new column first:

vjingzhang_1-1675750854690.png

Change the data type:

vjingzhang_2-1675750890215.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @swebb 

 

A date value is composed with Year, Month, Day. If your Month column only contains month names like "January"/"Jan", it cannot be changed to Date as it doesn't provide valid Year or Day for the month. You need to concatenate the month with Year and Day, then convert the new column to date type. 

For example, add a new column first:

vjingzhang_1-1675750854690.png

Change the data type:

vjingzhang_2-1675750890215.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thank you, this worked for me. 

HotChilli
Super User
Super User

A month is not a date. We'll need some more information to get to the bottom of this.  Please show us what you have and what you want.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.