How to calculate an index with percentages