I have always been interested in the Fatimids. There are multiple ways for such a survival to take place.
1. The Qarmati do not continuously bother them throughout the 10th century. The Qarmati were a Shi'a offshoot based in Bahrain that had considerable influence in areas such as Syria and Iraq. They were aggressive raiders and managed a large number of different raids on both the Buyids and the Fatimids. In the time of al-Muizz they even managed to reach al-Fustat, disrupting the building of al-Qahira. They allied often against the Fatimids with the Buyids and attacked them stopping them from fulfilling their ambitions in the Levant and Mesopotamia.
2. Avoid The Buyids from capturing Baghdad. This squared them up directly against the ambitions of the Fatimids, since they took up the title of Great Amir, and protectors of the Abbasids. Often Fatimid attempts to take the city from them failed handily and were honestly, quite pitiful. The Buyid Amirate of Khuzestan(at most times there were three different Buyid Amirates) was the main blocker of this expansion. If you remove the Buyids from Mesopotamia, they can both become more stable(controlling Baghdad forced them to fight often with the Qarmati, the Fatimids, and the Hamdanid dynasty, which weakened them greatly and tied up good rulers. They can enjoy good relations with the Fatimids(though as Ithna Ashara they won't always be best buds with the Isma'ilis) and cooperate against mutual threats such as the Qarmati if they don't take Baghdad. This would then allow the Fatimids to take Baghdad, which they had a capacity to do in the reign of al-Aziz.
3. Have Arslan Basasiri, the Seljuq convert to Isma'ilism not lose in a skirmish in Khuzestan where he was killed and the chance to make Baghdad Fatimid lost forever. He had captured the city but had relented in sending the Caliph to al-Mustansir, the Fatimid Imam-Caliph. If he done this and won in Khuzestan, and if al-Mustansir had sent more aid and men, he may have been able to make it back to Egypt, where he would be able to fight against the Seljuks once again and retake Baghdad, as the Seljuqs would be lost in the Levant.
There's a few others such as avoiding the civil war of the 1060s, but those are less helpful. The civil war is pretty much the point of no return; after that there is little chance of the Fatimids rising again.