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
nicolast29
Helper V
Helper V

Why is there thoses numbers xxx E-13

Hi 

I have a simple transformation to control the amount of ht ina bank account

The result shoul be in most of the case 0, but for some values, it is like 1,13687E-13 in place of 0

 

I try different way, copy pas by notepad before, change type to devise, but i cannot solve it ...

PQpopina - ex2.xlsx

 

e2.xlsx

3 REPLIES 3
collinsg
Super User
Super User

Good day nicolast29,

I cannot claim to have an answer but I may have some clues.

 

If you were to enter the number 2213.267 in a table in an Excel workbook and then from another workbook import the table, an apparently curious thing happens. If you click on the cell in Power Query the window at the bottom will show the value as 2213.2669999999998. This number has 17 significant digits. This is also the maximum number of digits a 64 bit floating point number supports (the "number" type in Power Query). I think there is a clue here - somehow the representation of 2213.267 in binary when brought into Power Query is approximating the value slighty.

 

A number such as 1/3 cannot be completely represented digitally because it has an infinite number of places after the decimal - it would be understandable that it must be approximated - but 2213.267 does not have an infinite number of places after the decimal. That is a mystery to me.

 

In mitigation of the problem changing the type of column HT to "currency" at the end gets rid of the very small numbers - they appear as zero. Some numbers remain non-zero but I believe these are genuinely non-zero. 

 

collinsg_0-1706213104661.png

I also think there is something in this article by Ben Gribaudo. He describes how types such as "currency" are "facets" rather than truely distinct types. The "facets" give information to recipients of data as to how to treat it. Thus changing data type in Power Query to "currency" leaves it under the surface as decimal but gives Excel the indication that it should import this column as a currency type. I saw this behaviour when I changed the type of the column contain 2213.267 to currency and then in a second step back to decimal - the ...999998 disappeared, then re-appeared.

I hope this helps a little.

nicolast29
Helper V
Helper V

Thanks for your answer but it is not my case, see example file

serpiva64
Super User
Super User

Hi, in power query if you have a number like this

serpiva64_0-1706100608459.png

whenyou turn it to decimal you obtain this

serpiva64_1-1706100644080.png

if you round it 

serpiva64_2-1706100707232.png

you obtain

serpiva64_3-1706100731870.png

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !

 

 

 

 

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.

Top Solution Authors
Top Kudoed Authors