求MDX语句 急!!!

彬冰四火 2009-11-06 03:40:04
已知: cube有一度量值count, 维度分别为 dimtime(year, month), dimproduct, dim partment
现要新增度量为count的百分比 也就是要求出count在一个时间内不同 products 和partment所占百分比
因为我也是刚刚学这个 不知道该怎么办 向各位大哥大姐求救 先谢谢了~!
...全文
116 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
彬冰四火 2009-11-10
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 bendanlzh 的回复:]
路过……帮顶!
[/Quote]
- -!!
谢谢了, 不过... 我更希望能帮我解决....
bendanlzh 2009-11-10
  • 打赏
  • 举报
回复
路过……帮顶!
彬冰四火 2009-11-09
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 f926115 的回复:]
with
member measures.total as sum([Time].[month].[all],Measures.[Cost])
member measures.monthritio as 'measures.cost/measures.total'

select {[dimproduct].[all],[dim partment].[all]} on columns,
([Time].[Month].members) on rows from cube
where measures.monthritio

measures.total是將measures.count中的總數算出來,measures.monthritio則是所佔的百分比。

應該有更好的方法,還請大家分享


[/Quote]

先谢谢了, 不过... 这个方法貌似不行, 因为我的数据集架构是星型架构, 各个维度之间没有任何父子关系, 所以 当select {[dimproduct].[all],[dim partment].[all]} on columns 时
系统会报错:成员属于 函数中的不同层次结构。
还有就是 我是要求竖栏位的总和百分比, 可是竖栏位中包括dimproduct 和dimpartment 所以 我也不知道到底该怎么求当前成员的值....还请大家帮忙看看
再次感谢!!!!
f926115 2009-11-09
  • 打赏
  • 举报
回复
with
member measures.total as sum([Time].[month].[all],Measures.[Cost])
member measures.monthritio as 'measures.cost/measures.total'

select {[dimproduct].[all],[dim partment].[all]} on columns,
([Time].[Month].members) on rows from cube
where measures.monthritio

measures.total是將measures.count中的總數算出來,measures.monthritio則是所佔的百分比。

應該有更好的方法,還請大家分享

7,393

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据仓库
社区管理员
  • 数据仓库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧