Computing a percentage from a table of values