Forum Discussion
Total Value in Measure
Hi All,
I have a table with three columns (Country, Col1 and Col2). I need to multiply the columns Col1 and Col2. I have used a measure to multiply but this is also getting multiplied for Total Row as well. In Total row, the values in each column should get added.
| Country | Col1 | Col2 | My Measure | Expected Measure |
| Aus | 1 | 50 | 50 | 50 |
| NZ | 2 | 100 | 200 | 200 |
| Total | 3 | 150 | 450 | 250 |
Please help in letting me know how to create a measure where the multiplication should not happen in Total Row.
- Anonymous4 years ago
Hi Krishnan_47 ,
I think you can try this code to create a measure.
Sum Multiply = VAR _ADD_Multiply = ADDCOLUMNS ( 'Table', "Multiply", 'Table'[Col1] * 'Table'[Col2] ) RETURN SUMX ( _ADD_Multiply, [Multiply] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Krishnan_47 ,
I think you can try this code to create a measure.
Sum Multiply = VAR _ADD_Multiply = ADDCOLUMNS ( 'Table', "Multiply", 'Table'[Col1] * 'Table'[Col2] ) RETURN SUMX ( _ADD_Multiply, [Multiply] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.