为AS 2005的Cube指定默认度量值

来源:互联网 发布:lighttpd服务器软件 编辑:程序博客网 时间:2024/05/04 16:52
该篇文章是我于2009年6月10日通过自己编写的工具,批量从位于在博客园的博客站点(http://chenxizhang.cnblogs.com)同步而来。文章中的图片地址仍然是链接到博客园的。特此说明!

陈希章

原文地址:http://www.cnblogs.com/chenxizhang/archive/2008/06/11/1217236.html
原文标题:为AS 2005的Cube指定默认度量值
原文发表:2008/6/11 2:46:00

In some cases, it is not obvious or easy to create a default measure in AS2005 cubes. In fact, there is no default measure by default, which can lead to long query times for queries that specify no measures. We have seen slow behavior with several query tools that display an initial default query or heavily browse the hierarchies, especially Proclarity.

默认情况下,AS 2005的Cube并没有指定一个默认的度量值,这样的情况下,它会随便选择一个度量值作为默认度量值。如果用户在MDX中没有指定度量值的话。这可能会导致一些用户的困惑,以及可能降低速度

为了解决这个问题,可以参考下面的两个步骤

To add a default measure, you can follow the code below:

1. Generate a new calculated member with NULL value: --创建一个计算成员,设置为空值

CREATE MEMBER [CubeA].[MEASURES].NullMember AS null, VISIBLE = 0 ;

2. Include the new member in the cube as default measure: --把该计算成员指定为多维数据集默认的度量值

ALTER CUBE [CubeA]

UPDATE DIMENSION Measures,

Default_Member = [MEASURES].NullMember;

也可以通过图形化界面去做这个事情(在Cube设计器里面)

image image作者:陈希章
出处:http://blog.csdn.net/chen_xizhang
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

原创粉丝点击