使用 SCOPE MDX 聚合层次结构

发布于 2024-12-08 16:05:55 字数 788 浏览 1 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌梦深 2024-12-15 16:05:55

这是一篇非常旧的帖子,但我也在尝试解决这个问题。
冻结;似乎可以解决问题

It's a very old post but I was trying so solve this too.
FREEZE; seems to do the trick

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文