Forum Discussion
sum multiple columns, how to?
- Anonymous9 years ago
Have you tried the proper syntax using SUMX?
MeassureName = SUMX(TableName, TableName[column a] +TableName[column b] +TableName[column c] ...)
That should do the trick.
Br,
Magnus
You can find the solution in the below link
https://community.powerbi.com/t5/Desktop/SUM-row-by-row/m-p/22938#M7278
- theo9 years agoHelper III
Thank you Thiyags.
I actually have used that manual iteration but am looking for some sum formula.
would like also to do similar calculation like standard deviation by row, etc.
- Anonymous9 years agoNot applicable
Have you tried the proper syntax using SUMX?
MeassureName = SUMX(TableName, TableName[column a] +TableName[column b] +TableName[column c] ...)
That should do the trick.
Br,
Magnus
- MattAllington9 years agoCommunity Champion
In addition to Magnus' correct recommendation, you may also like to consider unpivoting your data into a single column of values.
ID, A, B, C, D, E
1, 5, 7, 5, 6, 3
2, 3, 9, 2, 6, 4
Is better stored like this
ID, Type, Value
1, A, 5
1, B, 7
1, C, 5
1, D, 6
1, E, 4
2, A, 3
2, B, 9
2, C, 2
2, D, 6
2, E, 4
This second design will be much more performant and compressed. You can then also use a simple SUM(Table[Value])