In continuation of previous question: There were two/ three periods when I didn’t have any dues of loan on me and was capable of doing obligatory hajj but couldn’t perform.
Later when I performed hajj I had dues of loan on me.
So please tell whether my hajj is valid as obligatory one?

As you mentioned there were two/three occasions when you were able to do the haj there was not any loan on you at that time haj was wajib and finally Alhumdulillah you were able to perform.Yes Haj is valid.May Allah accept it.