It depends whether you want to skip those values and perform yearly average or assign any default values to those missing values.
Drop the year in column field and then perform either of the below options.
To find the yearly average skipping the missing values
IF ZN([Sales]) != 0 THEN [Sales] END
Then Drop the field and convert the aggregation to AVG while showing data.
To add missing values to some default and then perform aggregation.
Duplicate the field (sales/ profit/ any measure) and edit the duplicated field name and code.
IF ZN([Sales]) = 0 THEN [CONSTANT VALUE] ELSE [Sales] END.
Here constant value could be average of the same field or any non-zero value.
Then drop the field and calculate the average aggregation