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.
Hi Anonymous not sure your MAX(week)...for cumulative? So I did not add this filter, you may modify it
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