Calculate position change in table