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.
Solved! Go to Solution.
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
@Marck ,
It would be nice if you share some sample data of your scenario to understand the context.
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
Thank you for your help
Check out new user group experience and if you are a leader please create your group
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.
User | Count |
---|---|
395 | |
200 | |
83 | |
79 | |
63 |
User | Count |
---|---|
458 | |
220 | |
133 | |
90 | |
82 |