posts - 63,comments - 71,trackbacks - 0
比如ClosingPeriod函数 ,老看不懂用了什么用,写以下MDX

 

with member [measures].[a1] as 'ClosingPeriod( [Time].[Month], [Time].currentmember) .name'  

SELECT {[measures].[a1] } ONCOLUMNS , { [Time].allmembers } ONROWS FROM [Sales]


执行后出现以下结果

             a1
1997    12
Q1        3
1           1
2            2
3           3
Q2         6
4            4
5            5
6            6

这下能看懂这个函数作用了吧


ClosingPeriod( [Time].[Month], [Time].currentmember)

里面的[Time].[Month]控制结果为月这个级别 

ClosingPeriod以后 ,就会把[Time].currentmember的当前值下的最后一个月显示出来

比如Q1是第一季度 ,出来的是3月

 类似的办法可以把很多函数返回结果打印出来
posted on 2007-12-03 20:10 还没想好名 阅读(432) 评论(0)  编辑  收藏 所属分类: 技术

只有注册用户登录后才能发表评论。


网站导航: