cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marck
Helper I
Helper I

How to sum two column fields?

Hello,

 

I have two column that i would like to add. One column is the result of a calculation field called goal events adjusted and the other one is a column called all goals.

I have been trying to add up these two columns but the result is wrong. 

I am using sumx as function somone have any suggestions?

 

 

Thank you.

1 ACCEPTED SOLUTION
BA_Pete
Super User II
Super User II

Hi @Marck ,

 

If the two columns you are trying to add together are in the same table then:

 

To add a new sum column:

_summedValues = [column1name] + [column2name]

 

To add as a measure:

_summedValues = SUM(yourTable[column1name]) + SUM(yourTable[column2name])

 

If they are not in the same table then you must ensure the two tables are related, then you can do the following:

 

To add a new sum column:

_summedValues = yourTable1[column1name] + RELATED(yourTable2[column2name])

 

To add as a measure:

_summedValues = SUM(yourTable1[column1name]) + SUM(yourTable2[column2name])

 

Pete

View solution in original post

3 REPLIES 3
Tahreem24
Super User II
Super User II

@Marck ,

It would be nice if you share some sample data of your scenario to understand the context.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, and Sales Analysis Report
BA_Pete
Super User II
Super User II

Hi @Marck ,

 

If the two columns you are trying to add together are in the same table then:

 

To add a new sum column:

_summedValues = [column1name] + [column2name]

 

To add as a measure:

_summedValues = SUM(yourTable[column1name]) + SUM(yourTable[column2name])

 

If they are not in the same table then you must ensure the two tables are related, then you can do the following:

 

To add a new sum column:

_summedValues = yourTable1[column1name] + RELATED(yourTable2[column2name])

 

To add as a measure:

_summedValues = SUM(yourTable1[column1name]) + SUM(yourTable2[column2name])

 

Pete

View solution in original post

Thank you for your help

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors