Writing separate scope statements solve this problem as:
Scope([Dimension1].[All Level], [Measures].[testmeasure]))
THIS = NULL;
END Scope;
Scope([Dimension2].[All Level], [Measures].[testmeasure]))
THIS = NULL;
END Scope;
and so on ...........
Anish Tuladhar - Do not forget to mark as answer, only if helpful.:)