With your data structure by default it should give '2' against a Sum(Value) expression. However, if you are using kind of Sum(If(..., it could result in an output of '4'. In such cases where you have to put a condition you could use set analysis instead of if, like: