Hi Helmut Schütz,
I think this is not a fault caused by NULL and NA differences. He is not an error of exp() function, nor is it an error of isNull, nor is it an error of if function. He is a logic error! ! !
For example, for "if(isNull(pk3), 0, exp(pk3))", we generally think that the program is executed like this:
1. Execute the "if (criteria statement, true statement, false statement)" statement
2. Execute the criteria statement,
3. Return the value of the criteria statement,
4. If the value of the criterion statement = true,
5. Then execute the true statement,
6. Return the value of the true statement,
7. Take the value of the true statement as the return value of the if statement, exit the if statement.
8. If the value of the criterion statement = false,
9. Then execute the false statement,
10. Return the value of the false statement,
11. Take the value of the false statement as the return value of the if statement, exit the if statement.
12. End if
But the logic of Phoenix is ??problematic, I guess he executed the statement like this."
1. Execute a false statement,
2. Return the value of the false statement,
3. Execute the true statement,
4. Return the value of the true statement,
5. Execute the criteria statement,
6. Return the value of the criteria statement,
7. Execute the if statement,
8. If the value of the criterion statement = true,
9. Take the value of the true statement as the return value of the if statement, exit the if statement.
10. If the value of the criterion statement = false,
11. Take the value of the false statement as the return value of the if statement, exit the if statement.
12. End if
Therefore, no matter whether the result of your judgment statement is true or not, the false statement is applied with all the data, and if there is any failure to execute, an error is reported! ! !
I have encountered this wonderful logic error before.
https://support.cert...wizard-replace/
So to solve this problem in the current version, it can only be solved by introducing auxiliary columns.
For example, for the current problem:
The first step: Transformation--Custom
New Column Name:pk3fl
Formula:
If(isNull(pk3), 0, pk3)
The second step: Transformation--Custom
New Column Name:
Formula:
If(isNull(pk3), 0, exp(pk3fl))
Sincerely,