2

In schema Sales, I create a set which gives result if it is defined within the scope of a statement. The following code is in the MDX IDE:

with set [facts] as {[Measures].[Amount], [Measures].[Count]}
select [facts] on 0
from sales

This gives the measures Amount and Count perfectly as result

If I define the same set on the session level, or in the Builder (tab: advanced) it raises an error.

To reproduce, do the following in the MDX iDE:

create static set [facts-2] as {[Measures].[Amount], [Measures].[Count]}

and then type:

select [facts-2] on 0
from sales

The MDX IDE gives as error:

set( [facts-2] ) : '[Measures].[Amount]' is neither a dimension nor a hierarchy within the cube.

Am I doing something illegal here or is this a bug?

4

1 に答える 1

1

セットを作成するときにキューブを追加する必要があります。この特定のシナリオでは役に立ちませんが、評価スコープを定義する評価がある場合に必要です。

そう :

create static set [sales].[facts-2] as {[Measures].[Amount], [Measures].[Count]}

はい、エラーはあまり役に立ちません

于 2015-09-01T12:22:52.010 に答える