Used to describe a situation where someone was close to achieving something but ultimately failed
He was close to winning the competition, but close but no cigar.