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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.