There's a couple different ways I'd do it:
1.Make a section or projected view such that the feature isn't hidden, and put the dimension in that view.
2. Make a "broken out" section in the original view, with a depth such that the feature you're dimensioning to is part of the section, and then you can dimension to the feature.
I'm not sure if SW will let you violate the age-old drafting standard of "not putting dimensions on hidden features". Somebody knows for sure one way or the other though.
The recognised standards do not recommend dimensioning to hidden lines ... however the standards aren't always right;
Tools > Options > System Options > Display/Selection ... Selection of Hidden Edges > Allow selection in Wireframe and HLV modes.
A Broken Out section is usually used to expose the hidden details.