vitamin D deficiency?

So last week i got tested a whole bunch of stuff one of them being my Vitamin D. 
Today i got my results, my vitamin D levels are below 30 and from what my doctor said and what I've read this could be the reason I had a Miscarriage back in January and why I'm having problems concieving(9 and half months of ttc). 
I thought i was drinking enough Milk but apparently not So I have a perscription i need to take once a week for the next 8 weeks and take Vitamin D supplements everyday. 
Has anyone else had this problem?