Forum Discussion
problem with foating number
another thanks but my expression wasn't good, let's try another way,
my objectif is to import data from the sheet importjanvier only (because i need all the details)
you: Well then you can use the pivot table added field formulas I provided to round or check for significant differences.
Me: Ok, that point the pb, but didn't solve it because i have to import each row from importjanvier
you: But note that the differences of 0.01 are real based on your original table in your workbook -- they are not a result of floating point inaccuracies. You'd need to go further back in the data chain to determine where that 0.01 difference is coming from.
Me: ok i wasn't enought precise, focus in my head with the other values
May be it doesnt come from the floating point inaccuracies
in case of a difference of 0.xx (from 1 to 2 digit) i will automatically create an row for compensation
Only the row with 0.xxyyyyzzzz .... cause me trouble
I don't understand what you want. It seems that what you posted is not what you really want.
In your workbook, you show a two column pivot table with floating point addition errors in many rows. Since this two column table is a pivot table, I showed you two formulas, either one of which you can use in a Pivot Field custom formula to correct that issue.
I also discussed some other approaches to your problem, but the first should work given what you have posted in your question.
But no matter how you do it, the approach is the same -- you adjust the precision of your results to match what you require, or test for the acceptable variance from zero. (Setting the data type to Currency in PQ effectively sets the precision to four decimals).
If you need something else, you'll need to be more detailed.
By the way, there are other methods of dealing with this issue in Power Query. As well as methods to add in that balancing entry.