Yes, apply the filter within a calc of the measure.
Sales for Type A
if [Type] ='TypeA' then [Sales] end
This a row level condition that will give a record either [Sales] or NULL depending on whether the criteria is true.
When aggregated it will only add up the needed values (keep in mind all records are coming through. The records that aren't of Type A just aren't getting included as values in the aggregate number)
This is why "View Underlying Data" will still show all records for that grouping irrespective of the "filter"