SQL Server 2008中SQL应用系列及BI笔记系列--目录索引
导读:本文继续介绍创建高级度量和计算的基本技巧:使用MDX表达式创建计算成员和应用条件格式、理解计算优先权。
本文末尾提供两个项目源码:AdventureWorks_BI_Begin3和AdventureWorks_BI_End3,顾名思义,开始和完成。另外,包括数据库文件SSAS2008SBS_Data,请读者自行修改数据源ds的连接串。
本文将包括以下内容:
■1、使用:累加、伪累加、无累加、半累加的聚合函数创建度量
■2、使用元组(tuples)和MDX函数识别和导航cube中的单元格
■3、使用MDX表达式创建计算成员
■4、使用MDX表达式应用条件格式
■5、理解计算优先权
■6、使用计算脚本语句应用一个MDX公式到一个Cube
■7、创建KPIs(key performance indicators)
3:使用MDX表达式创建计算成员
4:使用MDX表达式应用条件格式
关于MDX表达式IIF的用法,请参看MSDN(http://technet.microsoft.com/zh-cn/library/ms145994.aspx)
此时,部署项目,你会发现部署很快。因为我们只是修改了计算成员,并没有改变任何dimensions或cube的数据或格式,因而Analysis Services不需要处理任何数据。
重新步骤项目,并在browser选项卡中,选择Reconnect
再新增计算成员
也可以利用脚本来生成计算成员
5:在度量维度外创建变量成员
悲剧发生了!
除法纠正过来了,又注意到新的悲剧!
注意:
1、计算成员有先后顺序,最后一个表达式将Win。跟并发锁的原理是否有点类似?
2、当AGGREGATE MDX函数被用于计算成员时,计算成员求和性的度量取决于度量的聚合函数属性。(When the AGGREGATE MDX function is used in a calculated member, the calculated member summarizes measures based on the measure’s AggregateFunction property.)
附: SQL Server Analysis Services 官方教程(http://technet.microsoft.com/zh-cn/library/ms170208.aspx)
源码下载:
begin3
end3,将在本系列的7/7完成后提供。
数据库下载
分享到:
相关推荐
Microsoft SQL Server 2008 Analysis Services Step by Step 随书光盘
Teach yourself to use SQL Server 2008 Analysis Services for business intelligence—one step at a time. You'll start by building your understanding of the business intelligence platform enabled by SQL ...
Microsoft SQL Server 2008 Analysis Services Step by Step
《Microsoft SQL Server 2008 Analysis Services Step by Step》随书数据库,由邀月(3w@live.cn)整理上传,本数据库只限学习、研究之用,不得用于商业用途,否则后果自负。
Microsoft-SQL Server 2008 Reporting Services Step by Step(2009).pdf, 学习2008 报表服务的好书
英文版一步一步学习sql 2008 报表服务
Microsoft SQL Server 2012 Analysis Services 高级教程 pdf
Microsoft SQL Server 2008 Reporting Services Step By Step.part4
Microsoft SQL Server 2008 Reporting Services Step By Step.part1
Microsoft SQL Server 2008 Reporting Services Step By Step.part2
Provides information on the fundamentals of Microsoft SQL Server 2005 Analysis Services. Teach yourself the fundamentals of SQL Server Analysis Services—one step at a time. With this practical, ...
SQL Server 2005 Analysis Services Step by Step
Microsoft-SQL Server 2008 Reporting Services Step by Step(2009) 随书光盘 案例数据库文件及补充阅读
Provides information on the fundamentals of Microsoft SQL Server 2005 Analysis Services. Teach yourself the fundamentals of SQL Server Analysis Services—one step at a time. With this practical, ...
Provides information on the fundamentals of Microsoft SQL Server 2005 Analysis Services. Teach yourself the fundamentals of SQL Server Analysis Services—one step at a time. With this practical, ...
Microsoft SQL Server 2008 Analysis Services Unleashed分析服务器很深的技术类书籍
SQL Server 2005 Analysis Services Step by Step CD光盘
This title serves as an authoritative guide to Microsofts new "SQL Server 2012 Analysis Services" BI product and is written by key members of the Microsoft Analysis Services product development team....
为了实现这一目的,你将在《SQL Server数据库经典译丛:SQL Server 2012 Analysis Services高级教程(第2版)》中了解到如何使用SQL Server Analysis Services设计、构建和处理多维和表格商业智能语文模型(BISM)。...