You want to add the costs together ?
If you could attach a sample file, that would help.
What will be your cost column here ?
A cost+B cost ??
I think if you want to get the hierarchies for the measures then what Jonathan suggested would be the way.
Otherwise you can create a parameter and a calculated field:
If [parameter]="combined" then A cost+B cost
elseif [parameter]="A cost" then A cost
else B cost
Parameter would have three values to choose from :