0
votes

I'm using MDX and Microsoft SQL Server 2008 Analysis Services. I know that in an MDX query, you can define query-scoped calculated members. (See Microsoft.com.) Is it also possible to create query-scoped dimensions, hierarchies, and/or cubes?

1
What do you mean? Be able to create dimensions at runtime just for a query?michele
Yes, that's what I mean. It seems common that a new dimension can be inferred from existing dimensions, and I want to know if MDX can handle that in the workspace of a query, or if it requires some session scripting or a cube redesign. This question wasn't getting any traction, so I tried to approach it from a different angle here: StackOverflowTerry
I don't think you can define new dimensions with new members at runtime, since how can the cube handle them? The cube need to be elaborate in order to work properly. What about shape a proper subcube instead?michele
Michele, my understanding is that the "CREATE SUBCUBE" command applies to a session, not a query. Is there some way to create a query-scoped subcube?Terry
To be honest, most of the times I needed, I just used a nested select query like Select ... From (Select ... From [Cube]). The nested select statement is more or less like declaring a subcube in place.michele

1 Answers

0
votes

No, you only can have query scoped members and sets (and -nearly never used - query scoped calculations). In Essbase, but not in Analysis Services, you can also have query scoped tuples. But you cannot have any other query scoped objects in MDX.