简体   繁体   中英

Sum of multiple index matches with tables

I am trying to get the sum of associated columns from multiple different tables.

This works for one table, =INDEX(Table2[@W],MATCH([@[Franchise ID]],Table2[@[Franchise ID]],FALSE),1)

However when I try to add a second table, it throws an error =SUM(INDEX(Table2[@W],MATCH([@[Franchise ID]],Table2[@[Franchise ID]],FALSE),1),INDEX(Table224[@W],MATCH([@[Franchise ID]],Table224[@[Franchise ID]],FALSE),1))

How can I make this work?

The same has been answered by question owner itself through comment.

Posting that answer behalf of @chris James Champeau

The Exact Formula Is:

=SUM(SUMIF(Table2[Franchise ID],[@[Franchise ID]],Table2[@W]),SUMIF(Table22[Franchise ID],[@[Franchise ID]],Table22[@W]),SUMIF(Table224[Franchise ID],[@[Franchise ID]],Table224[@W]))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM