Forum Discussion

Learner86's avatar
Learner86
Helper I
4 years ago

Calculate sum over multiple rows

Dear Community,

 

I need your help again.

 

Imagine I have the following table

 

IDColumn 1Column 2Column 3
51003010
6501580
7706090
Sum220105180

 

And I need a new table like this:

 

IDColumn 1Column 2Column 3Sum rows
51003010140
6501580145
7706090220
Sum220105180505

 

I used DAX to calculate the values in the columns 1 to 3. For examle: Column 1= CALCULATE(SUM(Table[Column X]), FILTER(Table, Table [Column Y ]=100 &&Table [Column Z]= "A")). I got the row "Sum" automatically, when I used the visual "Table".

 

I want to add the values in column 1 to column 3. How can I generate the column "Sum rows"?

 

Thank you very much!

4 Replies

  • You could add a new measure that adds Column1, Column2 and Column 3

    Sum Rows = [Column 1] + [Column 2] + [Column 3]

     

    The matrix visual has row totals when you use field(s) in the Columns field well.

    • Learner86's avatar
      Learner86
      Helper I

      PaulOlding: I used this formula before but it doesn't work. The matrix visual doesn't help me because I can't use the field "column".