There are a couple of issues with your formulas as they are presented.
“ThisRow” does not require parenthesis after, and the position of “sub_count” within the .Sum is incorrect. You could try this -
Table2.Filter(Table2.Item = ThisRow).Item.Sum()
Because you are filtering on Table2, the “.Item” after the Filter formula will refer to the Item column from Table2.
If that doesn’t work then it would help if you provide a screenshot or two, or even embed a copy of your doc for the community to look at (a copy with any private data removed of course).
The problem is “[Invoice 1].Item” returns a list of all values in the Item column of the Invoice 1 table. Thus your formula is indeed summing all values in the table because of this.
When you look at the “chips” in a formula, there is a small icon at the right-hand end that indicates this -
The icon looks like one row on top of another. This indicates there is more than one value in the result that that chip represents.
If you remove “Invoice 1” from just that part of the formula, it will/should work. It should look like this -