Hello Aspirant,
Yes you can do so. There is no need to appear for compartment examination but what you can do is either you can appear for NIOS or any other recognized open board and they provide the facility for On Demand Examinations and for the same you can appear either in the subject in which you have failed or for some other subjects in which you want improvement, from this you can save your year but make sure to check the applicable dates on the respective board's official website.
I hope this information helps you.
Good Luck!!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile