Dividing Income between California and Maine

Maine resident here. Self-employed. Earned income "in" California. The CA state form indicates, "Enter your total income or loss from all business you conducted in California while you were a nonresident." How do I determine my "California Amount"? Is this my gross income from CA sources, a percentage of my federal adjusted gross income (federal AGI), or something else?

 

If it is a percentage of my federal AGI, would I calculate the "California Amount" by doing the following calculation? (Gross CA income) / (Gross all income) x (federal AGI)