إِذْ قَالَ يُوسُفُ لِأَبِيهِ يَا أَبَتِ إِنِّي رَأَيْتُ أَحَدَ عَشَرَ كَوْكَبًا وَالشَّمْسَ وَالْقَمَرَ رَأَيْتُهُمْ لِي سَاجِدِينَ – 12:4
[Of these stories mention] when Joseph said to his father, “O my father, indeed I have seen [in a dream] eleven stars and the sun and the moon; I saw them prostrating to me.”
فَلَمَّا بَلَغَ مَعَهُ السَّعْيَ قَالَ يَا بُنَيَّ إِنِّي أَرَىٰ فِي الْمَنَامِ أَنِّي أَذْبَحُكَ فَانظُرْ مَاذَا تَرَىٰ ۚ قَالَ يَا أَبَتِ افْعَلْ مَا تُؤْمَرُ ۖ سَتَجِدُنِي إِن شَاءَ اللَّهُ مِنَ الصَّابِرِينَ – 37:102
And when he reached with him [the age of] exertion, he said, “O my son, indeed I have seen in a dream that I [must] sacrifice you, so see what you think.” He said, “O my father, do as you are commanded. You will find me, if Allah wills, of the steadfast.”
Take a look at both the ayats. The first one is about the dream of Yusuf AS and
the second is the dream of Ibrahim AS