Forum Discussion
PowerBI calculate average (sumproduct) shows error data
- 6 years ago
Try like
Col_NVL = CALCULATE(
divide(sumx('NVL','NVL'[actual qty]*'NVL'[Total]),sum(NVL[actual qty])),ALLEXCEPT('NVL',NVL[Line.]),FILTER(,'NVL'[Week]<=max('NVL'[Week])))
move all expect outside filter.
No, it's wrong, what I need is average of " sum(build QTY*total)/sum(Build QTY), I tried to add "*", but failed in average().
Hi Anonymous not sure your MAX(week)...for cumulative? So I did not add this filter, you may modify it
- Anonymous6 years agoNot applicable
Anonymous
系统显示, the syntax for "return" is incorrect.
- Anonymous6 years agoNot applicable
Anonymous result shows, all lines output are the same, actually not. would you pls have a look the data which I sent to v-kelly-msft , I don't want to accumulate it, but if I remove <=max(), then all line data are the same
Workshop Line. Week 02bbbb
W Line 131 WK14 230
W Line 30 WK14 230
W Line12N WK14 230
W Line12Q WK14 230
W Line29 WK14 230