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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Universe24
Frequent Visitor

Column values into other table

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

TowerTeamSpends 
HRSalary20
HRTeam outing500
HRTransport200
HRSalary500
HRTeam outing500
HRTransport500
HRSalary200
HRTeam outing500

 

Tab 2

TowerTeamSpends 
HRSalary0
HRTeam outing500
adminTransport200
adminSalary500
OperationsTeam outing0
HRTransport500
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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:

vrzhoumsft_0-1684220386526.png

 

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.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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:

vrzhoumsft_0-1684220386526.png

 

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.

 

amitchandak
Super User
Super User

@Universe24 , A new column in DAX

 

Sumx(filter(Table1, Table1[Tower] = Table2[Tower] && Table[Team] = Table2[Team]), Table1[Spend])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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