History reports that Alexander the Great never lost a battle. He was overwhelmingly successful in every military campaign that he undertook. The battle for India is a little less certain. While Alexander the Great did success in momentarily taking large parts of the country, he never conquered the entire nation. Some of the leaders simply capitulated before they were forced to, while others stood their ground, resulting in massive devastation of life.
King Porus is one who stood his ground. While both sides had significant losses to their armies, Alexander did manage to control the area for a short while. But when his army reached the Hyphasis River, they mutinied. The soldiers were ready to return home, and the waiting army across the river was much larger, with war elephants, and chariots. Alexander conceded to his men, and the military turned back toward home.
Without having taken any further action into India, the region was unstable. While the Macedonian administration managed to hold their ground for a short time, the Indian people eventually revolted and regained their territory, driving out the administration set up by Alexander.
By this time, Alexander had passed away, and four of the generals who had served under him were fighting amongst themselves to control his empire. Technically, Alexander was not defeated in India, but victorious, even though he did not manage to subdue the entire nation.