After delivering the bad news, Daniel pleaded with the King to change his ways and avoid the fate promised by the dream. It involved stopping sinning and being merciful to the poor:
Daniel 4:27 King Nebuchadnezzar, please accept my advice. Stop sinning and do what is right. Break from your wicked past and be merciful to the poor. Perhaps then you will continue to prosper.
The king changed his ways only after the foretold seven years of madness.