I had capital gains and dividends earnings in 2016. In 2016, I was a resident of VA until 12/5 when I moved to DC. How do I calculate how much was earned in each state?

I calculated that I lived 93% of the 2016 in VA and 7% of 2016 in DC. I applied that proportion to the capital gains and dividends earned for each state in my state tax returns. Is this the correct method? I am worried that it will all be reported to VA without understanding that I am also paying taxes to DC.