For the order of execution of the steps of CALCULATE, first the FILTER is evaluated in the existing filter context, before the context transition.
This means that the Sales table is not yet filtered by the Color.
Then the filter context happens, adding the filter over the currently iterated 'Product'[Color] to the filter context inside CALCULATE.
Eventually the filter over Sales is applied.
Since this is a filter over the whole Sales table, the expanded table is used.
This means that any filer existing over the Sales expanded table is replaced.
The Sales expanded table contains the 'Product' table, since a one to many relationship exists between Product and Sales.
The result is that the filter over Product[Color] set by the context transition is removed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…