Here is one way:
not Count ( Field2 ; Field3 ) ; Field1 ;
not Count ( Field1 ; Field3 ) ; Field2 / 4 ;
not Count ( Field1 ; Field2 ) ; Field3 / 12
But have you covered all your bases? What if only Field2 has a value? Or 1 and 2? Because if these are the only configurations - if a value only exists in ONE of the three fields then this would work as well:
Field2 / 4 +
Field3 / 12
IsEmpty ( Field 1 ) and IsEmpty ( Field 2 ) ; Field 3 / 12 ;
IsEmpty ( Field 2 ) and IsEmpty ( Field 3 ) ; Field 1 ;
Field 2 / 4
Here is another way, using the oft forgotten Xor function:
( Field1 xor Field2 xor Field3 ) * ( Field1 + Field2/4 + Field3/12 )
The first part is True (or 1) if and only if exactly one of the three fields is non-empty and non-zero. That is why we can add all of the fields in the second part.
This is by far the most difficult formula to understand of those suggested so far. I would recommend Nehme's suggestion if you ever want to review your calculation.
"( Field1 xor Field2 xor Field3 ) * ( Field1 + Field2/4 + Field3/12 )
The first part is True (or 1) if and only if exactly one of the three fields is non-empty and non-zero"
You also get a True if all 3 fields are non-empty and non-zero.
True. And that is why I would not recommend my solution, it is a bit too difficult to correct.
Although this would help:
not ( Field1 and Field2 and Field3 ) * ( Field1 xor Field2 xor Field3 ) * ( Field1 + Field2/4 + Field3/12 )
I repeat, this is not the most obvious code. Only do it this way if you are sure that someone you hate will do all further development.
This works: Max (field1 ; field2 / 4 ; field3 / 12 ), IF 2 and 3 are empty if 1 is not, 1 and 3 are empty and 2 is not, and 1 and 2 are empty and 3 is not.
Another issue not being taken into account ... we are all working from the assumption that the fields are empty or have an integer. However, what if the field contains 0? Count() and IsEmpty() will produce false positives.
What also works:
not Field2 + Field3 ; Field1 ;
not Field1 + Field3 ; Field2 / 4 ;
not Field1 + Field2; Field3 / 12
This would treat empty and 0 fields the same.