State tax filing

Thanks for your reply, but I am still confused with this allocation.

I lived in New York City from Jan-Jun 2021, and worked for a company A in New York. W2 salary from company A is 40,000. and I have a capital gain10,000.

Then I moved to Wisconsin and live from Jul-Dec 2021, and worked for a company B in Wisconsin. W2 salary from company B is 60,000.

How shall fill the table below? It will be allocated by time or by income?allocate new york state adjustment.JPG