There are two points to cover. First is the NM definition of "part-year". NM states:
Part-Year Resident
You are a New Mexico part-year resident if you meet all of
these conditions:
• You were a New Mexico resident for part of the year.
• You were not physically present in New Mexico for 185
days or more.
• On December 31, you were no longer domiciled in New
Mexico and you had moved to another state, intending
to maintain domicile status in that other state.
Part-year residents who change domicile during the year
are not residents of New Mexico for income tax purposes for
periods when the taxpayer’s domicile is outside New Mexico.
If you do not satisfy those requirements, your total income is subject to NM income tax.
If you do satisfy those requirements, what NM does is first have you report your full income and then, for part-year and non-residents the calculated tax is, with some adjustments, reduced to the fraction of income earned in NM.
So in either case, you need to report the total income for both the federal and state.