ssas

Merging two tuples in the same hierarchy into one (in MDX WITH SET command)

烂漫一生 提交于 2019-12-24 20:26:45
问题 The following MDX query returns measure X on 3 tuples: 2001, 2002-1 and 2002-2. What I am trying to do is merging 2002-1 and 2002-2 into one tuple and have the measure X for 2001 and 2002-1&2. Using SUM function is not possible. Because measure X is used on other axis. with member v as [Measures].[X] set w as {[Dim Date].[Calendar Date].[Year].&[2001], [Dim Date].[Calendar Date].[Month].&[1]&[2002], [Dim Date].[Calendar Date].[Month].&[2]&[2002]} select w on 0, v on 1 from [DS]; 回答1: You can

Run xmla file (Analysis Services) from command line

妖精的绣舞 提交于 2019-12-24 14:37:44
问题 I'm looking for tool or a easy way to run xmla script (example for create or delete cube). I used to make exe file using Inno Setup program and there I can write command which can run another exe file just like in command line. I found that there is such tool such as ascmd.exe (Readme For Ascmd Command-line Utility Sample). But it was used in older versions of MS SQL. Is there any other for MS SQL Server 2012 and newer versions? I can say that I wasn't use ascmd.exe tool because I wasn't able

Using X4R package in R to connect to a SSAS cube?

穿精又带淫゛_ 提交于 2019-12-24 13:29:39
问题 I am trying to figure out how to use X4R package to load a cube into R workspace. My server name is "//vmtest//xmla2//msmdpump.dll"" and the cube name is "Ocube_MANMartCube" . I couldn't find a way to connect to cube yet. I tried the following code: library(X4R) handle<-xmlaConnect(url="//vmtest//xmla2//msmdpump.dll"") The message I am getting is <?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap

Many-to-many relationship in SSAS Tabular project

家住魔仙堡 提交于 2019-12-24 13:03:19
问题 I'm trying to set up a many-to-many relationship in SSAS Tabular. I've got the following in my tabular project (sales, customers, customer emails): A sale is tied to a customer. A customer can have multiple emails. How would I create a list of all emails that fit the current filter of a pivot table? For example, I could create a pivot table shows "accounts with margin < 20%", and want a list of all emails associated with those accounts. Sample, starting with the following sales data: customer

Using the ANCESTOR function on a DATE dimension

て烟熏妆下的殇ゞ 提交于 2019-12-24 09:37:30
问题 Here is my script: WITH MEMBER [Date].[Date - Calendar Month].[2MthPrev] AS ( ANCESTOR( CLOSINGPERIOD([Date].[Date - Calendar Month].[Calendar Month]), 2 )) SELECT NON EMPTY { [Date].[Date - Calendar Month].[2MthPrev] } ON ROWS, NON EMPTY [Measures].[Revenue] ON COLUMNS FROM [OurCube] The query runs with no error but the result pane is empty. I've attempted to create a custom member in the [Date - Calendar Month] hierarchy that is two months previous to the last month in the hierarchy's level

SSAS MDX Calculate running total but exclude less significant rows

陌路散爱 提交于 2019-12-24 03:19:16
问题 Old SQL developer, new to MDX: Need help with a requirement to include small totals in a running total but not show the contributing rows of those small totals. Consider this data Amount Running Total Denver 6,321 6,321 Portland 8,426 14,747 Boise 19,222 33,969 Helena 23,257 57,226 Bozeman 31,225 88,451 Seattle 36,894 125,345 My requirement is to not show any amounts under 15,000 but instead show the running total that includes them. I must not show amounts or running totals less than 15,000.

Testing DAX calculation with NBi

一个人想着一个人 提交于 2019-12-24 02:55:09
问题 I'm doing some research on automated test tool for our SSAS Tabular project. I found NBi and thought it is really cool. I attempted to set it up and successfully ran some basic tests. However, when I attempted to test dax calculation, it says "Function not found" (see screenshot). It sounds like it does not support SUM, but given that SUM is a basic function I would imagine it should work. Since I'm new to this tool, I wanted to double check if I've done something wrong or it is simply what

Is [All] a level aswell as a member

左心房为你撑大大i 提交于 2019-12-24 01:27:47
问题 Looking at the diagram for our ClientId hierarchy I see a pattern that is repeated in most hierarchies: If I expand All then every member of that hierarchy is included - is All a level as well as a member? 回答1: All, is the parent member of all the members of an attribute whose propertey "IsAggregatable" is set to TRUE. ALL is also a level that contains the All-member(s). Depending what you are using the following statements can return a reasonable result or an Error, so I would it is good to

SSAS Partition Slice Expression

穿精又带淫゛_ 提交于 2019-12-24 00:27:06
问题 I am partitioning my cube by the most recent 13 months, and then a legacy partition to hold older months. I have successfully created dynamic partitions, but now I need to add a dynamic slice to each partition. I thought I could use this in the Partition Slice Expression: [Dim Date].[Month].&[" + CStr(Month(Now())) + "].lag(8) but it's failing. Does anyone have any ideas? 回答1: I tried all day, but ultimately resolved that partition slice expressions dont like anything that is not a dimension

Distinct count to exclude NULL

久未见 提交于 2019-12-23 16:15:27
问题 Is there a way to create a calculated measure that can do a distinct count, but excluding the null values? For example, if I have: 10, 20, 20, null; the distinct count is 3, but can I have the answer as 2? 回答1: put a where condition to where the measure is not null 回答2: you could try this: with cte ( "counter" ) as ( select 1 as "counter" from "YOURTABLE" group by "COLUMNNAME" having ( "COLUMNNAME" IS NOT NULL ) ) select SUM( "counter" ) from cte @ edit: quite easier variant: SELECT COUNT(