Is the markup fixed? If so, surely the unit cost will always be 10% higher for you than for Joburg, so you can simply take whatever your cost of sales is and divide by 1.1 to give you the answer?
Apologies if I've understood wrong!
Edit: And if you need this to be correct for Joburg too, have the expression as:
f(Branch='Johannesburg', [Cost of Sales], [Cost of Sales] / 1.1)
This is by no means probably the best way of doing it, but another way of doing it allowing for different markups for each product would be:
Resident Load the Joburg Unit Costs:
[Cost of Sales] / [Sales Quantity] as [Unit Cost]
Where Branch = 'Johannesburg';
Then use an aggr statement to calculate the overall cost of the items sold at Joburgs unit cost by:
=Sum(Aggr(Sum([Sales Quantity]) * [Unit Cost], [Item Code], [Financial Year], [Financial Period], Branch))
Making sure you allow for all the variables you need to break it down by in the Aggr statement!
I've tested that and it's working with the data you sent over. Let me know if you need any further explanation - I've attached what I did here.
Joburg COS Example.qvw 192.5 K