Hi and sorry if this has been posted before

I have a spreadsheet that contains a number of items that have percentage distribution for two time periods i.e. the max distribution can only be 100% meaning this particular product is available in all stores

I have put these values into a pivot table and of course, the sub totals sum up all of the values, so I changed the field settings to Max which works perfectly. I then thought to add a custom field that works out the difference between the percentages over the two time periods, but it isn't working as planned as the result is simply telling me the difference between the two summed up sub totals not the max percentages. For example Total A Last Year was 63% and Total A This Year is 83%, percentage change is 32%. Changed totals to Max (Last Year 48%, this year 52%) and the percentage change should be +8%. but is still showing as 32%

Any help would be very much appreciated