to simplify: MAX({customer.fxbalance})/SUM(NULLIF(...
# general
c
to simplify: MAX({customer.fxbalance})/SUM(NULLIF({fxamount},0))