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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mahenkj2
Solution Sage
Solution Sage

Floating point issue

Hi,

I have a table in Excel sheet, column name is Distance, it has decimal number in it. In power query, I want to transform it by first making it integer/whole number and then multiply it with a factor, say 2.1.

 

When I see the real value in the query pane, whole number is really whole number without any decimal, but after multiply it with 2.1, it shows some decimal number but digits are increase very much, like 12*2.1 = 25.2, but it shows 25.200000000000003

 

I attach sample excel sheet and .pbi file for reference.

 

https://drive.google.com/drive/folders/1ONZwVbetCKbAIyfiKw3R_a1BKTfbqXx0?usp=sharing 

 

After checking several post on this matter, it seems a floating point issue. If power query can not handle this thing, I have no option but to make these columns in source tables, but before that I want to get support on this forum. Thanks. 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

The way floating point is handled in Excel, in the same way it has to be handled in PQ as well. The solution is Rounding the number in both apps. You can use Number.Round for this. Your second last step which is Added Custom1, should be this

= Table.AddColumn(#"Changed Type1", "standard", each Number.Round([#"dist@2.1"]*2.1,1))

You can also run Rounding by using Transform - Rounding - Round as your last step on your last column.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

You could probably use Double.From([NumberColumn])

 

--Nate

mahenkj2
Solution Sage
Solution Sage

Thanks. I did not think to round the output, instead was seraching for this just not to happen.

 

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

The way floating point is handled in Excel, in the same way it has to be handled in PQ as well. The solution is Rounding the number in both apps. You can use Number.Round for this. Your second last step which is Added Custom1, should be this

= Table.AddColumn(#"Changed Type1", "standard", each Number.Round([#"dist@2.1"]*2.1,1))

You can also run Rounding by using Transform - Rounding - Round as your last step on your last column.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.