Calculating percentage of components in a total