To check if the dimension exists within the model, in PA 2.0.x version you don’t need to check the entirety of ‘}Dimensions’ element anymore. You can use the ‘DimensionExists’ function, which will return 1 if the dimension exists and 0 if the dimension doesn’t exist.
For further reading please refer to the IBM Article below:
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=dmtf-dimensionexists