The Expression node does not appear to be able to handle if statements that involve results pulled from columns of different Data Types. (Such as a number column being the result of a string column if statement). I also do not see any supported “to string” expression in the Expression node that might work around this problem.
Currently it requires duplicating the number column as a string so that it can be both treated as a number in the condition, and still incorporated in the result by pointing to the converted string column. I included the Column Expression in my example to show that it is not an issue with that node.
That was the first thing that I tried, but I guess that I must have capitalized String() instead of string(). Working now. It would still dramatically simplify complex formulas if it was unnecessary like it was in Column Expressions node.
Perhaps the error message could be clearer. It seems like the issue is the expression results needing to be converted, and I did not get that from the term “branch expressions”.
Maybe change the error message to something like. “All if statement results must involve only matching data types. Try converting all non-matching data types that occur in a result using a conversion expression such as string()”