Calculating percentage of total amount.