cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ABNHS84
Frequent Visitor

Changing type adds decimal places to value during import of Excel file

We have an Excel file that has a list of percentages in 'General' format. The data can be one of 1 decimal place, 0 decimal places, or it is an asterisk due to being suppressed. 

 

The problem we're encountering is that when we change the type of this column from 'ABC over 123' in Power BI (my apologies I don't know, and can't figure out what data type this signifies) to Text datatype (just ABC in the column heading) a handful of values (from a list of thousands) have a Very small number added to or subtracted from them, resulting in really long decimals. E.g.

66.1 becomes 66.099999999999994

64.9 becomes 64.900000000000006

40.2 becomes 40.200000000000003

 

The numbers appear correctly for the 'Applied Steps' prior to 'Changed Type'

 

I have no idea why Power BI would do this, and what we can do to remedy it, so any help greatly appreciated. 

 

1 REPLY 1
ibarrau
Super User
Super User

Hi. Continue and apply changes leaving the field like that. Then you can pick a format for columns under "Modeling" tab. Go to Data view and select the column. Then you can see what I mean. For example:

Modeling decimalModeling decimal

 

You can change Decimal number values in right side of coma. My value is 2 for UnitPrice. Check out how the column looks like after that change.

 

Hope this helps,

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


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors