Yes, you can appear for both exams in the same year. JEE Main serves as the qualifying exam for JEE Advanced.