Not sure why you want or need a calculated dimension for this ( I would use just an expression for TOTAL SALES, sum(Sales) ), but the % should look like this in both cases:
=sum(Sales) / sum(total Sales)
This gives different values than in your sample:
A 12.5 %
B 25 %
C 62.5 %
but this looks correct for me (assuming a total Sales of 8000).