cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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

I have the following table:

 

IndexRegionProfit
1North100
2South200
2Southeast50
3East350
4West450
5Northeast150
5Southeast250

 

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

 

IndexRegionProfitCalculated
1North100100
2South200250
2Southeast50250
3East350350
4West450450
5Northeast150400
5Southeast250400

 

I tried CALCULTE and SUMX but I received some errors.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
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
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.