cancel
Showing results for
Search instead for
Did you mean:
Highlighted
gluizqueiroz Member

## How to SUM values when a column is equal in a table, SUM per row, like SUMX does.

I have the following table:

 Index Region Profit 1 North 100 2 South 200 2 Southeast 50 3 East 350 4 West 450 5 Northeast 150 5 Southeast 250

I need to create a calculated column that SUM the column Profit when column Index is equal, like the following example:

 Index Region Profit Calculated 1 North 100 100 2 South 200 250 2 Southeast 50 250 3 East 350 350 4 West 450 450 5 Northeast 150 400 5 Southeast 250 400

I tried CALCULTE and SUMX but I received some errors.

1 ACCEPTED SOLUTION

Accepted Solutions Super User

## Re: How to SUM values when a column is equal in a table, SUM per row, like SUMX does.

@gluizqueiroz add a measure

`sum = CALCULATE( SUM( Table6[Profit] ), ALLEXCEPT( Table6, Table6[Index] ) )`

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.

1 REPLY 1 Super User

## Re: How to SUM values when a column is equal in a table, SUM per row, like SUMX does.

@gluizqueiroz add a measure

`sum = CALCULATE( SUM( Table6[Profit] ), ALLEXCEPT( Table6, Table6[Index] ) )`

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.