Forum Discussion
Measure (Multiply 2 columns from different tables) correct on lowest level but totals are too high
- 5 years ago
In general, (a + b + c) * (x + y + z) = a*x + a*y + a*z + b*x + b*y + b*z + c*x + c*y + c*z is not the same as a*x + b*y + c*z. I suspect you want the latter but your attempts are written like the former.
It's not completely clear to me how all your data tables are related so it's hard to say exactly, but you should be able to get the result you want using SUMX a bit like this:
_PlanBedarfStk = SUMX ( VALUES ( vw_aevo[ArtikelNr] ), [_PlanStk] * [_MEKxStk] )
In general, (a + b + c) * (x + y + z) = a*x + a*y + a*z + b*x + b*y + b*z + c*x + c*y + c*z is not the same as a*x + b*y + c*z. I suspect you want the latter but your attempts are written like the former.
It's not completely clear to me how all your data tables are related so it's hard to say exactly, but you should be able to get the result you want using SUMX a bit like this:
_PlanBedarfStk =
SUMX ( VALUES ( vw_aevo[ArtikelNr] ), [_PlanStk] * [_MEKxStk] )