Assume that a cube named MyCube has 2 dimensions, and I want to build an MDX SELECT statement without knowing the name of the dimensions but I have a list of elements with one element from each dimension:
SELECT [ELEM X from first dimension] ON 0,  [ELEM Y from second dimension] ON 1
FROM [MyCube]
Alternatively is there a function that will return the list of all dimensions and that I can use to built my MDX?