Math or ITE column bug?

I’d like to control net weight by using math & ite columns. But, the results on ite colum are not working consistently. Is it because of bug or wrong calculation?

You will probably find that the underlying values may not be exactly what is shown.
Try adjusting the number of decimal places in each of those columns from 2 to 4, and any differences should be immediately apparent.

1 Like

Unfortunately, nothing changes…

Perhaps the differences are smaller than that, but I’m pretty sure that’s what’s causing the discrepancy. If you click into those columns one by one you will see the actual values, which may include many decimal places.

In any case, try the following:

  • Change your math column as follows:
Round(G,2) - Round(T,2)
  • Then add a second math column using Round(N,2), where N is your Nett_Ton column.
  • Then compare the two math columns in your if-then-else column
1 Like

Still not any changes… :pensive:

Okay, that’s interesting.
There is something that I’m missing here, but I don’t know what it is.
Let’s wait and see what @Jeff_Hager says. He might spot something that I’ve missed.

1 Like

I thought the rounding would do the trick. Can subtraction present a floating point issue?

I think the first thing I would try is to change Check_NettoTon to round the result instead of rounding each number individually.
Round(G-T, 2)

If that doesn’t work, I’d probably scrap everything else, go back to one math column, but set it up like this. If the result is zero, then it’s a match.
Round(Round(N,2) - Round(G-T, 2),2)

3 Likes

The first solution works! Thanks a lot @Darren_Murphy and @Jeff_Hager :pray:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.