我有维度,它将单个事实值除以成员。 IE浏览器。 ([Dim]。[Member1],value),([Dim]。[Member2],value)..
我可以使用此单个值计算维度成员边距吗?
答案 0 :(得分: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行:)