Hello,
NaN means Not a Number. So there is at least one element in your calculation which evaluates to ‘’.
Use coalesce( ) to control this effect. See https://getodk.github.io/xforms-spec/#fn:coalesce
2 Likes