Forum Discussion
Simondeb
6 years agoFrequent Visitor
Sum If calculation problem
Dear all, I have trouble sutting my formul to have a sum the take into consideration my filters : Simul2 = if(Region[Opportunity type]="Simul"; CALCULATE(sum(Region[Value Impact]); filter(Re...
amitchandak
6 years agoSuper User
You are mixing column and measure calculations. You can try a measure like. You do not need handle filter unless you want change behaviour
Simul2 =
var _sel = SELECTEDVALUE(Region[Opportunity type])
Switch(true(),
_sel="Simul"; CALCULATE(sum(Region[Value Impact]),allexcept(Region[Region code]))
_sel="Won"; CALCULATE(sum(Region[Value Impact]))
)