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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
coejnot
Frequent Visitor

A field containing a date formatted as text in Transform data shows as wrong date in visuals

Hello,

I have a strange problem where I have a column imported to the dataset as text format while the data in the column is a date.

Example:

2021-08-01 (1. Aug 2021)

 

When I look at the table in the dataset (after importing it to the dataset), it looks correct:

2021-08-01

 

But, when I add it to a visual, any visual, it shows in this date format:

8/1/2021

 

As of my locale on my computer this would be 

8. Jan 2021

 

 

Can someone explain why this is happening? The date is still formatted as a text if I mark it in the dataset. 

What I would expect to happen is whenever I add this to a visual it should be treated as a text, not date.

 

 

 

2 ACCEPTED SOLUTIONS
Nathaniel_C
Super User
Super User

Hi @coejnot ,
Have you tried changing it to a date using locale in Power Query?

Nathaniel_C_0-1638282956754.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-xiaotang
Community Support
Community Support

Hi @coejnot 

When I import the same data, I get the correct result,

vxiaotang_0-1638515243089.png

and my setting is,

vxiaotang_1-1638515270062.png

If you don't want a date in text format to be automatically converted to Date type, you can change this setting,

Go to File - Options and settings - Options,

vxiaotang_2-1638515501621.png

https://docs.microsoft.com/en-us/power-query/data-types#automatic-detection-of-column-data-type-and-...

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @coejnot 

When I import the same data, I get the correct result,

vxiaotang_0-1638515243089.png

and my setting is,

vxiaotang_1-1638515270062.png

If you don't want a date in text format to be automatically converted to Date type, you can change this setting,

Go to File - Options and settings - Options,

vxiaotang_2-1638515501621.png

https://docs.microsoft.com/en-us/power-query/data-types#automatic-detection-of-column-data-type-and-...

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

We did an conversion of the field to a date field in Power Query, I believe the use locale would also help. 

Nathaniel_C
Super User
Super User

Hi @coejnot ,
Have you tried changing it to a date using locale in Power Query?

Nathaniel_C_0-1638282956754.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




We did an conversion of the field to a date field in Power Query, I believe the use locale would also help. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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