Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
I have the following tables:
Table 1.
| ID | REF | ValueA |
| 252 | 555 | 1000 |
| 261 | 560 | 1500 |
| 300 | 562 | 1350 |
| 324 | 578 | 2000 |
| ... | ... | ... |
| ... | ... | ... |
Table 2.
| Index | ID | ValueB |
| 1 | 252 | 100 |
| 2 | 252 | 150 |
| 3 | 261 | 500 |
| 4 | 300 | 100 |
| 5 | 324 | 150 |
| 6 | 324 | 150 |
| ... | ... | ... |
| ... | ... | ... |
The following relationship exists between Table1 and Table2:
| Table1 | Relationship | Table2 |
| ID | 1:* | ID |
I want to create a column in Table1 that, based on unique ID, is effectively:
Column = Sum(Table2[ValueB]) + Table1[ValueA])
Such that Table 1 would look like:
Table 1.
| ID | REF | ValueA | NewValue |
| 252 | 555 | 1000 | 1250 |
| 261 | 560 | 1500 | 2000 |
| 300 | 562 | 1350 | 1450 |
| 324 | 578 | 2000 | 2300 |
| ... | ... | ... | |
| ... | ... | ... |
So far, my solution has been to create a new table:
Table = SUMMARIZE(Table2,Table2[ID],"ValueC",SUM(Table2[ValueB]),"ValueA",SUMMARIZE(Table1,Table1[ValueA]))
And then create a new column in that table:
Column = ('Table'[ValueC]+'Table'[ValueA])
Which gives Table3:
| ID | ValueC | ValueA | Column |
| 252 | 250 | 1000 | 1250 |
| 261 | 500 | 1500 | 2000 |
| 300 | 100 | 1350 | 1450 |
| 324 | 300 | 2000 | 2300 |
| ... | ... | ||
| ... | ... |
Then, I can just add the new Column to a table or matrix visualisation.
However, instead of creating a new table first, I would prefer to simply create a new column in Table1 to the same effect in a single expression but I just can't figure out the DAX.
Solved! Go to Solution.
@ddalton if yes, like this:
Then this is your calc column:
@ddalton Table 1 and table 2 has a 1 to many relationship bases on the ID column?
@SpartaBI Yes, I should've mentioned that.
I've added the relationship to the original post but for clarity it's here too:
| Table1 | Relationship | Table2 |
| ID | 1:* | ID |
@ddalton if yes, like this:
Then this is your calc column:
That's brilliant! Thank you.
I had tried using SUMX but I wasn't entirely sure how it worked and wasn't aware of the RELATEDTABLE function.
@ddalton my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
Thanks. I'll check it out!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |