1

我有按成员划分单个事实值的维度。IE。([Dim].[Member1], value), ([Dim].[Member2], value) ..

我可以用这个单一值计算维度成员边距吗?

4

1 回答 1

1

使用计算成员公式作为嵌套 iif 为:

CREATE MEMBER CURRENTCUBE.[Measures].[margin]
 AS    
    iif([Dim].[Member1] = [Dim].[Member1].&[X],
    sum([Dim].[Member1].&[X],[Dim].[Member1].&[Y], value) / ([Dim].[Member1].&[X],value),

    iif([Dim].[Member1] = [Dim].[Member1].&[Y],
    sum([Dim].[Member1].&[Y],[Dim].[Member1].&[F], value) / ([Dim].[Member1].&[Y],value),

    iif([Dim].[Member1] = [Dim].[Member1].&[F],
    sum([Dim].[Member1].&[F],[Dim].[Member1].&[Y], value) / ([Dim].[Member1].&[F],value),

    etc...

公式很长,大约 150 行 :)

于 2013-05-29T07:45:31.043 回答