EXCEL DAX - Calculate the sum of a related table
<p><a href="https://i.stack.imgur.com/lagnH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lagnH.png" alt="enter image description here"></a></p>

<p>I want to show in the Table 1 the sum of each SKU. The sum comes from the Table 2. I tried the following DAX code for table 1:</p>

<p>sumx(Filter(Table2[Sales],Related(Table1[Sales]),Table2[Sales])</p>

<p>I read the <a href="https://stackoverflow.com/questions/25345181/summing-up-a-related-tables-values-in-powerpivot-dax">Summing up a related table&#39;s values in PowerPivot/DAX</a>, but don't quite get it. My case is that I don't want to assign the primary key to Table 1 and assign the foreign key to Table 2. </p>

<p>Thanks a lot for any suggestion.</p>