In TurboTax, you should complete all your non-resident state returns first, before you complete your resident state return. That way the program "knows" how much tax you paid to the non-resident state when it prepares the return for your resident state, and can give you proper credit.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.