Forum Discussion
MIkkelHyldig
Helper II
5 years agoSUM identical values across columns
Hi,
I have a table like where I need to sum across the table on the same ID.
My result should look like this looking at the ID column:
ID1 0 amount (sum of 200 and -200)
ID2 -200 amount
ID3 200 amount
Using this table:
| Amount | ID | IDVendor | Date |
| 200 | 1 | 2 | September |
| -200 | 2 | 1 | October |
| -100 | 2 | 3 | - |
| -200 | 2 | 3 | - |
| -100 | 3 | 2 | - |
Hi Anonymous
The measure returns a result which sums to many rows.
I created a two new tables with sum for ID and sum for VendorID and the related to the original table.
Cheers,
Mikkel
4 Replies
- amitchandak
Super User
- MIkkelHyldig
Helper II
amitchandak
It looks like the calculated column doesn't sum across both column ID and column IDVendor? It gives me a strange result- AnonymousNot applicable
Hi MIkkelHyldig ,
Try this
Measure = CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[ID],'Table'[IDVendor]))Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.