My apologies for late reply.
In the question tab, you can use this MEASURE. I have highlighted the changes from your formula in red color.
KEEPFILTERS will ensure that all context filters from inside the Matrix come into play
SalesofRepeatCustomersCalc = CALCULATE ( [Total Sales], KEEPFILTERS ( FILTER ( ALLSELECTED ( Sales[Customer] ), COUNTROWS ( FILTER ( ALLSELECTED ( Sales[Year] ), CALCULATE ( SUM ( Sales[Sales] ) <> 0 ) ) ) = [CountSelectedYears] ) ) )
The earlier version of the MEASURE was created to work as VISUAL filter. Thats why you dont see it in the Magic tab