Have capital gains from a K-1 from my non-res state (AZ). Because it is on my fed ret , the gain is flowing to my res state (MT) ret and can’t figure how to delete. Help

I have correctly added to AZ return just cannot remove or credit from MT return