Forum Discussion
DAX calculated column that sums by another column
Hello friends,
I have this table and I need to calculate the result in column TotalForProduct, which sums all the amounts per each Product:
Product | Month | Amt | TotalForProduct
A | Jan | 100 | 300
A | Feb | 200 | 300
B | Jan | 100 | 200
B | Feb | 100 | 200
How do I calculate this last column? I have it to be a column, not a measure. And it has to be DAX, not Power Query.
Thank you,
Michael
- Anonymous9 years ago
I think I have found my answer:
Thank you!
Michael
2 Replies
- AnonymousNot applicable
I think I have found my answer:
Thank you!
Michael
- v-huizhn-msft
Microsoft Employee
Hi Anonymous,
Congrtulations, you have find the answer by yourself. You also can create a calculated column using the following formula.Column = CALCULATE(SUM(Table2[Amt]),ALLEXCEPT(Table2,Table2[Product]))
Please see the the expected result as follows.
Please mark the right reply as answer, so more people will find workaround clearly.
Best Regards,
Angelia