# 使用MDX实现多维关联分析

。突然灵机一动，为什么不试试用mdx来实现分析呢？说干就干，一番试验下来之后，嘿嘿，还真成功了。下面说是我的成功步骤：

samplecube
--dim1
----dim1hier1
------dim1lev1
------dim1lev2
------...
----dim1hier2
--dim2
----dim2hier1
-------dim2lev1
-------dim2lev2
----dim2hier2
...
--measures
----sum1

with
member [measures].[dim1lev1sup] as ([dim1].[dim1hier1].[dim1lev1].currentmember, [dim2].[dim2hier1].[所有 dim2],

[sum1])/([dim1].[dim1hier1].[所有 dim1], [dim2].[dim2hier1].[所有 dim2],[sum1])
member [measures].[dim2lev1sup] as ([dim2].[dim2hier1].[dim2lev1].currentmember,[dim1].[dim1hier1].[所有

dim1],[sum1])/([dim2].[dim2hier1].[所有 dim2], [dim1].[dim1hier1].[所有 dim1], [sum1])
member [measures].[置信度] as ([dim1].[dim1hier1].[dim1lev1].currentmember,

[dim2].[dim2hier1].[dim2lev1].currentmember,[sum1])/([dim1].[dim1hier1].[所有 dim1], [dim2].[dim2hier1].[所有 dim2], [sum1])

select {[measures].[sum1],[置信度], [measures].[dim1hier1sup], [measures].[dim2hier1sup]} on columns,

order(filter({[dim1].[dim1hier1].[dim1lev1].members * [dim2].[dim2hier1].[dim2lev1].members},[measures].[dim1lev1sup] > 0.05

and [measures].[dim2lev1sup] > 0.01 and ([置信度]/([measures].[dim1lev1sup]* [measures].[dim2lev1sup]) >  1)), [sum1], bdesc)

on rows from samplecube

• 博文量
169
• 访问量
1056322