Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello Experts,
I have below two tables. I want to insert table 1 HR spends into table 2 HR spends where they are 0
Tab 1
| Tower | Team | Spends |
| HR | Salary | 20 |
| HR | Team outing | 500 |
| HR | Transport | 200 |
| HR | Salary | 500 |
| HR | Team outing | 500 |
| HR | Transport | 500 |
| HR | Salary | 200 |
| HR | Team outing | 500 |
Tab 2
| Tower | Team | Spends |
| HR | Salary | 0 |
| HR | Team outing | 500 |
| admin | Transport | 200 |
| admin | Salary | 500 |
| Operations | Team outing | 0 |
| HR | Transport | 500 |
Solved! Go to Solution.
Hi @Universe24 ,
I think you can try code as below.
New Spends =
IF (
Table2[Spends] = 0,
SUMX (
FILTER ( Table1, Table1[Tower] = Table2[Tower] && Table1[Team] = Table2[Team] ),
Table1[Spends]
) + 0,
Table2[Spends]
)
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Universe24 ,
I think you can try code as below.
New Spends =
IF (
Table2[Spends] = 0,
SUMX (
FILTER ( Table1, Table1[Tower] = Table2[Tower] && Table1[Team] = Table2[Team] ),
Table1[Spends]
) + 0,
Table2[Spends]
)
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Universe24 , A new column in DAX
Sumx(filter(Table1, Table1[Tower] = Table2[Tower] && Table[Team] = Table2[Team]), Table1[Spend])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |