Closes #16304
If amount = 1 and the category amount = -1, the sum is 0 and the returned value was amount instead of zero (`0 or amount`) Avoid this evalution error by splitting on multiple lines Closes #15470