Hope this message finds you well! I believe you might be getting an error due to the syntax of your calculated field. The ifelse function follows the below format:
ifelse(if, then [, if, then …], else)
With that in mind, I would try putting those other two MetricName statements within a bracketed list. Let me know if this helps!
Apologies for the delay in response! I was wrong about you needing to wrap the other if conditions in brackets. It is just shown that way so users are aware that multiple conditions can be within the function.
Although this is from my own example, I think this calculated field structure below should fulfill your use case:
Wrapping all of the if checks in sumOver’s make it so you do not run into misaggregation errors while getting your desired result. The bracket represents the desired partition of the calculation which is completely optional. Please let me know if this helps!