To prevent such an error it is recommended to make sure that the Attribute1 and Attribute2 values actually have a value. Build an extra exclusive split in to prevent this.
if ($Entity/Attribute1 != empty and $Entity/Attribute2 != empty)
then true
else false
When returned true go to your expression. When returned false do something else.
I think I have found the problem. It was not in this expression but in a retreive action just before the exclusive split, which did not find a record.
Is your attribute empty?
This check will fail if your attribute is empty. So add the following, $Entity/Attribute1 != empty and $Entity/Attribute1 > 0 and $Entity/Attribute2 != empty and $Entity/Attribute2 > 0.
Thanks for the quick replies!
I tried but the same result. Only now the error occurs on the expression of the extra exclusive split.
You should first check if $Entity itself is not empty, so, if
$Entity != empty and $Entity/attribute1 != empty and $Entity/attribute2 != empty and $Entitiy/Attribute1 > 0 and $Entity/Attribute2 > 0 then true else false
That should work at least. But if $Entity is the single input argument of your calculated attribute, this should never be the case.