My 300 Tdi sometimes does this ... a quick slap on the top of the dash sorts it!!
I suspect a loose connection somewhere but cba to find it as it's an intermittent problem and I'm sure that as soon as I take the dash off it'll fix anyway and be a b'stard to cahse down.