Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
semidevil
Helper I
Helper I

How do I create a column that sums from the same row

Maybe I'm missing something, but I want to create a column that sums 2 cells in the same row.  Something very similar to excel where column C1 = A1 + B1, C2 = A2 + B2, etc etc

 

I used SUMX but the new column is populated with the same number for the entire column (appears to be the grand total of all rows and columns combined)

 

Net = SUMX(Table1, Col1[cost] + Col2[gain])
1 ACCEPTED SOLUTION
RobertSlattery
Resolver III
Resolver III

Hi, are you putting this column into a calculated column or a measure?

If you are putting it in a measure, you will get the total of the sum of the two columns in the row context which depends on the granularity of your visual. So

    Net := SUMX(Table1, Col1[cost] + Col2[gain])

Will work.

 

If you are putting it into a calculated column then just write 

    Net = Col1[cost] + Col2[gain]

 

(The convention is "measure := ..." or "calculated column = ...")

View solution in original post

1 REPLY 1
RobertSlattery
Resolver III
Resolver III

Hi, are you putting this column into a calculated column or a measure?

If you are putting it in a measure, you will get the total of the sum of the two columns in the row context which depends on the granularity of your visual. So

    Net := SUMX(Table1, Col1[cost] + Col2[gain])

Will work.

 

If you are putting it into a calculated column then just write 

    Net = Col1[cost] + Col2[gain]

 

(The convention is "measure := ..." or "calculated column = ...")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.