You can have multiple calculations and just display the one you want. So for example:
field1 holds calculation #1, hidden for condition A
field2 holds calculation #2, hidden for condition B
etc.
So in your case you might have field1= average of all 4 fields, and then only display this calculation if the fields all have a value greater than 50.
field2 = average of 3 fields, only displayed when the excluded fields does not have value greater than 50,
More is possible with code, but this seems like a simple way of approaching this problem codelessly.