Arthur Schopenhauer said this quote

To measure a man's happiness only by what he gets, and not also by what he expects to get, is as futile as to try and express a fraction which shall have a numerator but no denominator.