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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
tbauch
Frequent Visitor

.CSV export incorrectly converting text to date

I am exporting data from my .pbix to .csv but some of my hyphenated part IDs (field is text in Powr Query) are being converted into dates. 

 

Here's the .csv Part ID shown as a date:

PBIPic01.JPG

Here's the .pbix viz showing the actual part ID:PBIPic02.JPG

Here's the Power Query field: image.png

 

How do I prevent the .csv export from converting my text strings into dates? 

 

Thank you. 

1 ACCEPTED SOLUTION

@amitchandak, WordPad shows that it's exporting correctly. It's only when I open in Excel that it coverts. I'll try to use the import wizard in Excel to better control the data types. 

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

In the model View. You have modeling tab. There you have the option to change data type and format

 

Screenshot 2019-10-10 18.06.34.png

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for the reply, @amitchandak. If you look at my post, you can see that the data is already formatted as text.

 

As shown in OP:

The "ABC" indicates it's textThe "ABC" indicates it's textimage.png

 

 

It appears that the conversion is taking place during the export process. 

Are you opening CSV in excel? If so please open it in Textpad and check. Excel might convert this.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak, WordPad shows that it's exporting correctly. It's only when I open in Excel that it coverts. I'll try to use the import wizard in Excel to better control the data types. 

Excel will treat is as text when it starts with '. But not sure the same is true when you export it like '2010-02-02

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
tbauch
Frequent Visitor

That did it. Thanks for walking me through the thought process. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors