日期:2014-05-18  浏览次数:20581 次

如何提高自身的MDX水平?

各位虾哥虾弟大家好,最近的兴趣在向BI方向转移,看了几本BI基础知识的书,目前在啃MDS语句,个人感觉MDX绝对是BI的精髓,因为你懂了MDX基本就会按BI的思维方式去思考,啃MDX这两天我最初感觉在大脑的中心有一个点,然后往头皮的各个点发射直线,最近感觉是脑袋里有特别多的立体的网格,而且明显感觉脑细胞不够用了,但还是很有兴趣,因为难,才好玩!呵呵。可兄弟最近很郁闷的是什么呢?MDX相关的书非常少,而且都写的不敢恭维。目前我看的是《MDX解决方案(第二版)》就是审校是杨大川那个,个人感觉书还成,然后去网站下了那个解决方案。看了其Readme.doc发现书和例子严重不匹配,导致很多想看效果的语句根本没办法跑起来。郁闷,不知各位怎么提高自己的MDX水平的?如有相关书籍或例子,敬请指教,不胜感激!

------解决方案--------------------
我之前看 SQL Server 2005 数据挖掘和商业智能。
BI的书确实比较少...

看最多还是联机丛书〉。。
------解决方案--------------------
SQL Server 2005 数据挖掘和商业智能

上次和FC一起去买的
------解决方案--------------------
木有,去下载专区看看有没
------解决方案--------------------
我也是看的这本《MDX解决方案(第二版)》,其他好像专门讲mdx的书很少了

------解决方案--------------------
瞭解原理,多實踐

------解决方案--------------------
只要你学会分类,并用不同的角度(分类)看一个问题,你就已经有BI的基本思想了.
MDX其实就是对 维,集合,元组 的操作.应该说既有角度的思想和编程的思想.
------解决方案--------------------
SQL code

with member [Measures].[月底销售量] as ([日期].[年-月-日].parent.lastchild,
[Measures].[精品销售量])
member [Measures].[月底销售量2] as ([日期].[年-月-日].FirstSibling.prevmember,
[Measures].[精品销售量])

member [Measures].[月初销售量] as ([日期].[年-月-日].parent.firstchild,
[Measures].[精品销售量])
member [Measures].[上月底销售量] as ([日期].[年-月-日].parent.prevmember.lastchild,
[Measures].[精品销售量])
member [Measures].[上月初销售量] as ([日期].[年-月-日].parent.prevmember.firstchild,
[Measures].[精品销售量])
member [Measures].[本月销售量] as sum(mtd([日期].[年-月-日]),[Measures].[精品销售量])

member [Measures].[上月销售量] as ([日期].[年-月-日].parent.prevmember,[Measures].[精品销售量])
member [Measures].[上月同期销售量1] as (PARALLELPERIOD(
 [日期].[年-月-日].[月], 1,[日期].[年-月-日]),
[Measures].[精品销售量])
--PARALLELPERIOD表示是是同期销售量
member [Measures].[上月截止销售量]  as 
(PARALLELPERIOD( [日期].[年-月-日].[月], 1,[日期].[年-月-日]),[Measures].[本月销售量])

member [Measures].[本年销售量] as sum(ytd([日期].[年-月-日]),[Measures].[精品销售量])

-----------
member [Measures].[上年销售量] as ([日期].[年-月-日].parent.parent.prevmember,[Measures].[精品销售量])
member [Measures].[上年同期销售量1] as (PARALLELPERIOD(
 [日期].[年-月-日].[年], 1,[日期].[年-月-日]),
[Measures].[精品销售量])
member [Measures].[上年截止销售量]  as 
(PARALLELPERIOD( [日期].[年-月-日].[年], 1,[日期].[年-月-日]),[Measures].[本年销售量])

select {[Measures].[精品销售量],[Measures].[月底销售量],[Measures].[月底销售量2],[Measures].[月初销售量]
,[Measures].[上月底销售量]
,[Measures].[上月初销售量],[Measures].[本月销售量],[Measures].[上月销售量] 
,[Measures].[上月同期销售量1],[Measures].[上月截止销售量],[Measures].[本年销售量]
,[Measures].[上年销售量] ,[Measures].[上年同期销售量1],[Measures].[上年截止销售量]
} on 0,{

[门店信息].[Shop ID].[Shop ID].allmembers
} on 1

 from [EquipmentKPI] where 
 [日期].[年-月-日].[年].&[2010].&[7].&[2010-07-31T00:00:00]