Forum Discussion

amirghaderi's avatar
amirghaderi
Helper IV
5 years ago
Solved

Incorrect Sum Matrix

How is possible the sum shown in matrix to be incorrect. If I calculate the sum in excel it gives me different number. the fields are decimal type as well. The data are columns as well, no measure....
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi amirghaderi 

    Try to build measures to get Price and H from Table B.

     

    Price From B = CALCULATE(SUM(B[Price]),FILTER(B,B[Category] in VALUES(A[Category])))
    H From B = CALCULATE(SUM(B[H]),FILTER(B,B[Category] in VALUES(A[Category])))

     

    Result:

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.