使用 SCOPE MDX 聚合层次结构
我在 SSAS 多维数据集中有一个要求,即在层次结构的不同级别以及每个层次结构级别的所有成员级别应用不同的计算集。我正在使用范围分配,并在叶级别成功完成此操作,但我无法在所有级别上进行范围分配,因为有一个包含 4 个级别的层次结构,并且除了四个级别中每个级别的所有级别之外,每个级别都有单独的规则。这篇文章澄清了我不涵盖所有内容的原因 http://www.purplefrogsystems.com/blog/2009/11/scope-problems-with-mdx-calculated-members
我的范围声明看起来像这样
SCOPE(DESCENDANTS([Commodity].[Category],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
SCOPE(DESCENDANTS([Commodity].[SubCategory],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
SCOPE(DESCENDANTS([Commodity].[Product],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
任何帮助非常感谢。
I have have a requirement in SSAS cube to apply different set of calculations at different levels in hierarchy and also at the ALL member level of each of the hierarchy level. I am using Scope assignment and successful in doing it at Leaf level but the All level I can't scope on since there is a hierarchy with 4 levels and each level has separate rule in addition to the the ALL levels for each of the four. The reason why I don't scope on all is clarified in this post http://www.purplefrogsystems.com/blog/2009/11/scope-problems-with-mdx-calculated-members
My scope statement looks like this
SCOPE(DESCENDANTS([Commodity].[Category],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
SCOPE(DESCENDANTS([Commodity].[SubCategory],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
SCOPE(DESCENDANTS([Commodity].[Product],,AFTER));
THIS = /*Calculation logic*/
END SCOPE;
Any help much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一篇非常旧的帖子,但我也在尝试解决这个问题。
冻结;似乎可以解决问题
It's a very old post but I was trying so solve this too.
FREEZE; seems to do the trick