Pharaoh’s annoyance increased when his magicians, one after the other, and then his wise men could not come up with a satisfying interpretation of his dream where seven thin cattle ate seven fat cattle. After the chief butler remembered how Joseph, a foreigner and prisoner, once calmed his own anxieties with dream interpretations that later came true Pharaoh ordered that Joseph be brought to him.
Joseph told Pharaoh that his dream meant he should set a discerning man over Egypt to reserve a fifth of the produce from seven years of plenty, represented by the fat cattle, so the people would have food to eat during the later seven years of famine, represented by the thin cattle. The interpretation pleased Pharaoh as well as many of Pharaoh’s top courtiers who saw themselves being chosen to lead the project.
Joseph’s humility in crediting his own God rather than himself for any dream interpretation he gave impressed Pharaoh. Not trusting his own courtiers he set Joseph in charge.