The problem is that the set analysis is applied to the whole data set (ie before the dimensions are applied). So the second part of your expression is looking for upgrades in the same month as the purchase.
I think your best bet is to use a date island, and link sales & upgrades with Sum..if statements, like this...
Dimension: the month from the date island (eg diMonth).
Expression: Sum(If(PurchaseMonth = diMonth, Sales)) + Sum(If(UpgradeMonth = diMonth, UpgradeSales))
For more info on setting up date islands, do a search on this site for - you should be able to find several examples that will help you.
Hope that helps