Pharaoh dreamed about the cows and the grain and it was clear to him that it was a prophetic dream. After all he was king and god, and his dreams predict the future of all of Egypt.
"Now it came to pass in the morning that his spirit was troubled; so he sent and called all the necromancers of Egypt and all its sages, and Pharaoh related to them his dream, but no one interpreted them for Pharaoh"(Genesis 41,8). How could it be that the necromancers could not solve the dreams; there were well known for solving dreams and their knowledge in witchcraft. After all it is clear to each of us that cows and grain are symbolic for food – bread, milk, meat; so the solution to the dream needs to deal with these things.
Rashi hints at an important truth that is hidden in the story. In his commentary on the verse he emphasizes that the necromancers had solutions, but Pharaoh did not think they were correct: "They did interpret them, but not for Pharaoh, for their voice did not reach his ears, and he had no satisfaction from their interpretation, for they said, “You will beget seven daughters, and you will bury seven daughters.” - [from Gen. Rabbah 89:6]
Just as we recognize words of truth, so do we recognize lies, and Pharaoh understood that he was not being told the truth. This explanation by Rashi brings up the likely possibility that that the necromancers knew that solution to the dreams. And possibly Pharaoh also knew, but they were afraid to tell him because they were worried he would be upset with them and blame them with responsibility for the famine. It is important to know that according to the traditions of the ancient Egyptian civilization and the ancient East in general, the person who solves a dream has serious responsibility. His explanation magically creates the new reality. If he solves the dream in a good manner, he brings good to the world, but if the solution is destructive he becomes responsible for the tragedy that follows.
In this way it is also possible to understand the suggestion of the Chief Cupbearer;
"And there with us was a Hebrew lad, a slave of the chief slaughterer, and we told him, and he interpreted our dreams for us; [for] each [of us], he interpreted according to his dream" (Genesis 41,9). Again Rashi's explanation is very helpful in understanding the intent of the Chief Cupbearer. "a Hebrew lad, a slave: Cursed are the wicked, for their favors are incomplete. He mentions him with expressions of contempt: a lad: a fool, unfit for a high position; a Hebrew: he does not even understand our language; a slave: and in the statutes of Egypt it is written that a slave may neither reign nor wear princely raiment. — [from Gen. Rabbah 89:7]. The Chief Cupbearer offers Yosef as a scapegoat. Yosef is a slave and a prisoner, and if he suggests a solution to the evil dream, that everyone knows, Pharaoh can place all the responsibility on Yosef and even kill him.
The Chief Cupbearer "remembers" Yosef not to help Yosef, but to enhance his presence in Pharaoh's court. Pharaoh will owe him because he found a dream solver who can be believed. The necromancers will show him compassion because he saved them from taking responsibility for the coming tragedy.
However, with G-d's help and by using his brains, Yosef was saved from the evil destiny that was planned for him. He was saved because he did not limit himself to explaining the dream, he immediately came up with a brilliant plan to save Egypt from the famine. He suggested to Pharaoh to accumulate the food during the 7 years of plenty and store them for the 7 years of famine. In this way Yosef undid the plan of the Chief Cupbearer and saved himself. Pharaoh, who likely understood what was going on among his advisors, gained from the success of Yosef and his escape from the plan of the necromancers. Pharaoh then appointed Yosef to be his viceroy and be responsible for saving all of Egypt.
Dr. Gabi Barzilai is a teacher of Tanach at the Yaacov Herzog Center