Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Error on data -8,88178E-16 - output

HI,   I have this piece of code in  PowerQuery EXCEL : let Source = Table.NestedJoin(#"0100 & others", {"Customer"}, Modeller, {"Sold-to"}, "Modeller", JoinKind.LeftOuter), #"Expanded Modeller" ...
  • Vijay_A_Verma's avatar
    4 years ago

    This is due to Floating Point Error.

    Whereever you are calculating Dif, over there you will need to use Number.Round (There are various rounding available but in this case just stick to default Number.Round). One example from your code, I am showing here. Remaining you can do on your own, here I am adding two decimal places. You can change decimal places to any number you want)

    #"Dif ZT37" = Table.AddColumn(#"Changed Type for decimal", "Dif ZT37", each Number.Round([ZT37] - [Modeller.ZT37],2))

    OR

    You need not make above change, just select all Dif columns - Transform menu - Rounding - Round and give appropriate decimal places