Check out this post, it may answer your question.
https://ttlc.intuit.com/questions/3539452-non-maryland-income-allocation-dc-resident-all-year-worked...