While a large group of people witnessed the sun "dance" on October 13, 1917 near Fatima, Portugal, the three shepherd children did not see the miracle.
Sr. Lucia explains in her memoirs that the visionaries saw a different apparition.
After our Lady had disappeared into the immense distance of the firmament, we beheld St. Joseph with the Child Jesus and Our Lady robed in white with a blue mantle, beside the sun. St. Joseph and the Child Jesus seemed to bless the world, for they traced the Sign of the Cross with their hands. When, a little later, this apparition disappeared, I saw Our Lord and Our Lady; it seemed to me to that it was Our Lady of Sorrows (Dolors). Our Lord appeared to bless the world in the same manner as St. Joseph had done. This apparition also vanished, and I saw Our Lady once more, this time resembling Our Lady of Carmel.
This vision was only seen by the children, while the crowd was witnessing the sun "dance."
It is believed that the "dancing sun" was meant to inspire belief in the unbelieving crowd, while Our Lady had a different message for the visionaries.
For example, Sr. Lucia saw Our Lady of Mt. Carmel to prepare the way for her entrance into a Carmelite monastery when she was older.
These two different visions highlight how God knows what we most need for the benefit of our faith.