我的立方体中有以下脚本:
/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].[Scope TEST]
AS
STRTOVALUE(2),
VISIBLE = 1;
SCOPE([Locations].[LocationName].Members, [Measures].[Scope TEST]);
this = SUM([Locations].CURRENTMEMBER, STRTOVALUE(1));
END SCOPE;
我希望脚本执行以下操作;
我有 5 个位置,所以当我添加度量时scope test
,它应该显示1
在每一行之后。这很好。
但是,它不会在总计行中显示 5。
这是我尝试使用的脚本的简化版本。在那个脚本中,我还没有使用范围,但是有或没有范围声明,这并不重要,因为没有区别。
如果有人能指出我正确的方向,任何帮助将不胜感激。