Federer, seeded four, trailed 0-3 and then 1-4 in the final set of the rain-delayed quarter-final before winning five successive games to reach the last four, where he will play the fifth seed Andy Roddick for a place in the final.
Federer, looking untroubled the back problem that hindered him in the fourth round, moved his opponent around the court, breaking in the fourth game of the opening set which he won 6-3 in 24
He achieved another crucial break in the seventh game of the second, but Schalken recovered in the third with some blisteringly struck deep ground-strokes, breaking Federer's serve for the first time in the second game to go 2-0 up.
But the Swiss recovered with breaks in the seventh and ninth games to become the first man from Switzerland to reach a Grand Slam semi-final since Marc Rosset at the French Open in 1996.