How to calculate Input Table selections?