Place it as the closing beat after a failed attempt, letting the miss land before the next scene. Follow it with a sad violin to close the joke, or put a wrong answer sound just before it so the failure is clear first.