I have an expression to sum a number of fields
This works correctly as long as there are the 4 fields.
But depending upon what the user has specified there may only be 1, 2, 3 or 4 fields.
If there are not 4 fields it then fails and gives and error.
I thought I could use a switch statement but this also fails as it has to solve each switch element which it cannot do.
I think the answer is to use nested iif statements, but I don't think I have got the nesting correct
"error: [BC30516] Overload resolution failed because no accessible 'IIf' accepts this number of arguments"
Here is a siplified version of my iif statements.
I think I need the nesting deeper but am not sure.