How could I add a linear dimension

Thank you so much Dale. I wanted to add dimension of the top view (XY plane), the width(Y) of a cube. But it always appears on the ZY plane. Is it possible to flip it 90 degree?