Forum Discussion

Charmaine's avatar
Charmaine
Frequent Visitor
8 years ago
Solved

Sumif between two tables

Hello all, do you have any ideas how to merge two table with sumif condition?     I have two tables as shown below and I would like to have a new column in TABLE 2 which in excel the new column wou...
  • nickchobotar's avatar
    8 years ago

    Charmaine

     

    Here is one of the approaches to solve this given that you do not have a relationship between the two tables.

     

    =CALCULATE(
    SUM(Table1[Record 1]),
    FILTER(
    	Table1, 
    	Table1[Col One] = CALCULATE(VALUES(Table2[Col One]))
    	)
    )

     

     

    If these tables are related in your model your calc column DAX will be simply  = CALCULATE(SUM(Table1[Record 1]))

     

    Thanks, Nick -