A conditional calculation using matrix fields are not working?