Forum Discussion
Charmaine
8 years agoFrequent Visitor
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...
- 8 years ago
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 -
Ashish_Mathur
8 years agoSuper User
Hi Charmaine,
Try this calculated column formula in Table2
=CALCULATE(SUM(Table1[Number]),FILTER(Table1,Table1[Text]=EARLIER(Table2[Text])))
Hope this helps.