Hi Lara,
Yes, with script logic the division by zero in some record (or with missing record) produce zero!
But why you want to have "despite the value of the account I'm using in the sum"? Division by zero produce infinite value
You have to use conditional operator - ternary operator in REC:
*REC(EXPRESSION=(%VALUE%==0) ? VALUEIFZERO : 1/%VALUE%,ACCOUNT=PESO_PRODUCAO_DIST_M)
Please explain the logic you want to achieve!
Vadim