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
TaraB89
Helper II
Helper II

Exporting data to Excel deletes last zeros

Hello,

 

EDIT:

I found that this is only the issue if I only export 2 columns.

See below. If I add a different column entirely it is not a problem, and if I add Verbruik (totaal) again, it exports correctly.

And when I switch the 2 columns Gebouwcode and Verbruik (totaal) around, the error is in the Gebouwcode this time.

Bug?

error power bi 3.JPGerror power bi 4.JPGerror power bi 5.JPG

 

 

I have Table visuals in Power BI Desktop and I want to Export these to Excel. The problem I get is when I export the data it seems to "delete" the last zero's (0) of some of my data entries. When I look at the Power BI table it looks correct but in the CSV it is suddenly wrong. This is also before the "text to column" thing I do to make the CSV more readable.

 

I have downloaded the latest Power BI version.

 

error power bi 1.JPGerror power bi 2.JPG

 

Please help 😞 

 

Kind regards,

Tara

8 REPLIES 8
kaiosgro
New Member

I've got the same issue and it caused a lot of work and confusion in my company, since I provided some information with an unique Id and it was insertet with a wrong last ditch into another system. It's a terribel error that I would never expact in a Microsoft Product!

But seems to be more like an Excel Error. When I export the IDs directly from my SQL Tabel I receive the same Error...... 20230525001106205 is replaced with 20230525001106200

v-yingjl
Community Support
Community Support

Hi @TaraB89 ,

When export data from power bi desktop to excel as a .csv file, it will remove the last zeros automatically, not a bug.

If you want to show the last zeros in the .csv file, you can try this way:

  1. Choose a blank column in excel, open the .CSV file from text in Data ribbonfrom text.png
  2. Click next to step3 directly
  3. Change the data format into text and finish itstep3.png
  4. You may get the result like this:result.png

You can also refer this similar issue: Exporting the data to CSV file 

However, one disadvantage of this solution is that after you save it, it will remind you to save as the .txt file so it is essentially no different from .txt.

 

Best Regards,
Yingjie Li

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

Thank you for the explanation.

 

Though how come this is only an issue when I have 2 columns and when I have more, the 0 is not removed when exporting to .csv?

az38
Community Champion
Community Champion

@TaraB89 

what is your column Verbruik?

Does it stored in data source as 0, or it's aggregated in Visual level?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thank you for the fast reply. I edited my question, I think it is a bug. The error is only there when I export jus 2 columns and only affects the last column. 

az38
Community Champion
Community Champion

@TaraB89 

I can not to reproduce mistake like yours with my dummy data.

So, how is your data stored in data source? whats aggregation do you use in visual?

try also to open your csv file with any text editor, like notepad or notepad++, what do you see? still empty value?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

When I open it in Notepad I see the data / csv correctly!

 

The aggregation I use in the Visual is Sum

The Source is an ODATA Feed. (webapi)

 

Since I see the data correctly in a notepad, the issue is then probably with Excel?

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.