I am unable to add a smart dimension using the temporary axis

I have been trying to recreate the circled image in the left by using the smart dimension after turning on the sketch button but it does not work. Could someone please help me in fixing the issue which I am encountering? 
Edu