Forum Discussion
Calculated column in Excel Power Query is showing very small difference from expected value
Hi,
I have a Query in Excel Power Query, where I created a calculated column from 3 other columns in the query. Strange thing is when I calculated manually by copying values from 3 columns, I get result -94.07. But the same calculation in a calculated column is showing value as -94.069999999999709. Column cell is showing value right (-94.07), but once the cell is clicked I see value in detail panel below as -94.069999999999709.
Though it's not giving any problem in what I wanna achieive, just curious to know why is it happening.
Thanks,
This is due to floating point arithmetic in IT systems. The article I am going to reference to you is pertaining to Excel but applicable for all IT systems including Power Query - https://learn.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arithmetic-inaccurate-result
Hi gafoorgk
This is due to Excel’s floating-point arithmetic, which can introduce tiny rounding errors. To display exactly -94.07, use the ROUND in Power Query:= ROUND([YourCalculation], 2)
This will ensure consistency between the cell and the detailed view. Hope that helps!
3 Replies
- Vijay_A_VermaMost Valuable Professional
This is due to floating point arithmetic in IT systems. The article I am going to reference to you is pertaining to Excel but applicable for all IT systems including Power Query - https://learn.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arithmetic-inaccurate-result
- gafoorgkFrequent Visitor
Hi,
Used ROUND function in Power Query already. I was just curious why PowerQuery was bahaving this way and I didn't know about floating-point arithmetic issue.
Involved numbers to get -94.07 is just normal decimal numbers, which works fine in Excel, but the same calculation in PowerQuery got this floating-point arithmetic issue. Strange!!! But anyway, thanks for pointing to the cause of this issue.