ssas

SSAS系列——【02】多维数据(维度对象)

我怕爱的太早我们不能终老 提交于 2020-03-08 02:10:23
原文: SSAS系列——【02】多维数据(维度对象) 1、维度是什么? 数学中叫参数,物理学中是独立的时空坐标的数目。0维是一点,1维是线,2维是一个长和宽(或曲线)面积,3维是2维加上高度形成体积面。在物理学上时间是第四维,与三个空间维不同的是,它只有一个,且只能往一方向前进。 图一 MSDN中关于维度的概念 2 、服务器对象的内容? 包括数据源、数据视图、数据库对象、安全角色和程序集。前4个都不难理解。关于程序集的概念,还需加强一下,程序集可为两种不同的类型:COM 和 CLR。CLR 程序集是使用 .NET Framework 编程语言(如 C#、Visual Basic .NET 和托管 C++)开发的程序集。说白了,你可以使用C#语言来编程处理服务器对象。 3、维度对象的内容? 简单 Dimension 对象由 基本信息 、 属性 和 层次结构 组成。基本信息包括维度的名称、维度的类型、数据源和存储模式等。属性可定义维度中的实际数据。属性可不必属于层次结构,但层次结构却要由属性生成。层次结构不但可创建级别的有序列表,还可定义用户浏览维度的方式。简单的讲,就像Session对象中的键值对一样,这里的key(基本信息)、Value(属性),但这里key之前可能存在一定的关系,所以多了一个层次结构。 维度的结构 a、最简单的——星型结构 特点:每个维度均基于一个通过主键

SSAS, dimension numeric value filtering

孤街浪徒 提交于 2020-03-03 12:58:13
问题 I am using the multiple dimensional model in SSAS with a seemingly simple requirement. I have a Product dimension table with a Price attribute. Using Excel pivot-table, I want to filter this Price attribute, for example "greater than $1000". However the filter in the pivot table is a string only, hence I can not do perform any numerical comparison operations, but rather for equivalent strings, e.g. "$1,000.00". My problem is similar to this thread, and I wonder if there is a solution/work

Counting latest instance of multiple only based on filter context

心已入冬 提交于 2020-02-25 09:49:26
问题 I've got a large table of events that have occurred in an inventory of vehicles, which affect whether they are in service or out of service. I would like to create a measure that would be able to count the number of vehicles in the various inventories at any point in time, based on the events in this table. This table is pulled from a SQL database into an Excel 2016 sheet, and I'm using PowerPivot to try to come up with the DAX measure. Here is some example data event_list : vehicle_id event

ssAs分区

非 Y 不嫁゛ 提交于 2020-02-16 13:35:45
在大多数情况下,分区包含的记录应少于 2 千万条,每个度量值组包含的总分区数应少于 2,000 个。此外,应避免定义所含记录不足 2 百万条的分区。分区太多会导致元数据操作速度缓慢,分区太少又会导致错过并行。 为实时数据定义单独的 ROLAP 分区,并将实时 ROLAP 分区放入其自己的度量值组。 http://blog.sina.com.cn/s/blog_62c0483c0100tdy7.html 练习1:创建度量组分区 AdventureWorksDW2008R2样本数据库存储了4年数据,按年(物理)分区Internet Sales度量组。 1)双击之前创建好的Adventure Works cube,进入分区(partitions)页面。 2)展开“Internet Sales”度量组,默认情况下,只有一个分区,绑定整个FactInternetSales事实表,表绑定(Table Binding)类型。 3)将默认分区重命名为“Internet Sales 2005”,绑定类型更改为“Query Binding”,查询语句: SELECT * FROM [dbo] . [FactInternetSales] WHERE OrderDateKey <= 20051231 4)点击“new partition”,同理,添加新分区“Internet Sales 2006”,

SSAS创建父子维度

坚强是说给别人听的谎言 提交于 2020-02-09 07:28:04
父子维度与其他维度不同的地方就是维度中的数据是递归层次关系的。如 adventureworksdw 库中的 DimEmployee 表中数据(上级和下级雇员的层次关系)就是递归关系。表中的主键是 EmployeeKey 列,对应于每个雇员的 ID ,雇员上级的 ID 保存在 ParentEmployeeKey 列。也就是说 ParentEmployeeKey 和 EmployeeKey 列是外键关系。 1、 在维度文件夹上右键,选择新建维度。在欢迎使用维度向导页上,单击下一步。 2、 在选择创建方法页上,选择使用现有表并单击下一步。 3、 在指定源信息中选择新建的数据源视图” Adventure Works DW “(我这保持默认)单击下一步。 4、 在选择相关表中,为了保持简单,去掉选中项。 5、 在选择维度属性页中,修改 EmployeeKey 名称为 Employee , ParentEmployeeKey 名称为 Employees 。 6、在完成向导页中,将维度名称改为 Employee 。 7 、在解决方案右击,选择生成而后点击部署,最后浏览数据。 修改维度属性 1、 在维度结构选项卡上右键 Employees 属性,在 MembersWithDataCaption 属性中输入 *(Direct) ,把领导给标记出来, * 会自动替换为相应的成员属性。 在

MDX - Filter multiple dimensions

…衆ロ難τιáo~ 提交于 2020-02-04 04:00:33
问题 I'm trying to form an MDX query such that it returns only the combinations of two dimensions where a measure meets a certain criteria. I thought this would be pretty straight forward using the FILTER function, i.e. SELECT NON EMPTY FILTER({[Program].[ByRegion].[Program] * [Performance Metric].[Metric].CHILDREN }, [Measures].[Point Percentage] < .95) ON ROWS, NON EMPTY ( HIERARCHIZE([Calendar Period].[Y-Q-M].[Month of Quarter].&[3]&[1]&[2009]) , [Measures].[Point Percentage] )ON COLUMNS FROM

OLEDE Error: Login failed for user 'DOMAIN\ComputerName$'.;28000

和自甴很熟 提交于 2020-02-03 08:22:13
问题 I am trying to deploy an Analysis Services cube in SQL Server 2012. My user account is REALM\Merin where REALM is the domain and my computer's name is Hercules . I am already in Analysis Service's administrator group. When I process the cube using SQL Server Data Tools, I get following error. OLE DB error: OLE DB or ODBC error. Login failed for user 'REALM\Hercules$'.; 28000. My user account is REALM\Merin but I don't know why it is complaining about user REALM\Hercules$. What does this

OLEDE Error: Login failed for user 'DOMAIN\ComputerName$'.;28000

风流意气都作罢 提交于 2020-02-03 08:21:51
问题 I am trying to deploy an Analysis Services cube in SQL Server 2012. My user account is REALM\Merin where REALM is the domain and my computer's name is Hercules . I am already in Analysis Service's administrator group. When I process the cube using SQL Server Data Tools, I get following error. OLE DB error: OLE DB or ODBC error. Login failed for user 'REALM\Hercules$'.; 28000. My user account is REALM\Merin but I don't know why it is complaining about user REALM\Hercules$. What does this

MDX query works but ignores the EXCEPT clause

非 Y 不嫁゛ 提交于 2020-01-25 08:08:00
问题 I have been working on a custom dll (that is called via a custom xll / Excel Addin) to construct MDX and return 2D data. It's working nicely and I just went to work out how I add the ability to send in an exclusion list using EXCEPT. I built up a query with filtering and this query works except it ignores the EXCEPT. Anyone with more MDX than me (I'm about 2 months in haha :)) know why? Thanks Leigh WITH Member [Measures].[Book_Label] AS [Book].[Book].CURRENTMEMBER.MEMBER_CAPTION Member

MDX query works but ignores the EXCEPT clause

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-25 08:06:12
问题 I have been working on a custom dll (that is called via a custom xll / Excel Addin) to construct MDX and return 2D data. It's working nicely and I just went to work out how I add the ability to send in an exclusion list using EXCEPT. I built up a query with filtering and this query works except it ignores the EXCEPT. Anyone with more MDX than me (I'm about 2 months in haha :)) know why? Thanks Leigh WITH Member [Measures].[Book_Label] AS [Book].[Book].CURRENTMEMBER.MEMBER_CAPTION Member