mdx

Is Power Pivot Multi Dimensional?

房东的猫 提交于 2019-12-12 05:10:49
问题 I created a multi dimensional pivot table in Excel and then used the following add on to generate the MDX: http://olappivottableextend.codeplex.com/releases/view/618637 The MDX was generated by Excel as follows: SELECT NON EMPTY Hierarchize(DrilldownMember({{{DrilldownLevel({[Customer].[Customer Geography].[All]},,,INCLUDE_CALC_MEMBERS)}}}, {[Customer].[Customer Geography].[State Province].&[New South Wales]&[Australia]},,,INCLUDE_CALC_MEMBERS)) DIMENSION PROPERTIES PARENT_UNIQUE_NAME

StrToMember does not accept calculated measure (mdx)

守給你的承諾、 提交于 2019-12-12 04:55:14
问题 I try to create a member by using some calculated measure (I have called it 'MyDay' here). I return date members on an axis and the members have a property which I want to use. I can return the property itself, but cannot create the member and work with it. WITH MEMBER [Measures].[MyDay] as DatePart("d", MyDateDimension.CurrentMember.Properties("MyProperty")) MEMBER MyDateDimension.[MyMember] AS STRTOMEMBER("MyDateDimension.&[2015]&[4]&[" + CStr([Measures].[MyDay]) + "]") MEMBER [Measures].

How to get a COUNT of NON-NULL members in a set with some conditions?

*爱你&永不变心* 提交于 2019-12-12 04:53:33
问题 To give you a slight background to the problem, there are certain "users" who do certain "tasks" which are categorized into various types; one such type being "DSR". The requirement I am faced with is to find how many requests of type DSR the userid 033343 worked on for each month of year 2013. What I would be needing is to get the count of the members in set of all the distinct requests a user (Userid = 033343) worked on in the year = 2013 and for the Request Type = DSR. Below is what I

calculate measure for some members that create some percent of total measure

こ雲淡風輕ζ 提交于 2019-12-12 04:32:19
问题 We have a cube that it has one measure (Commission Amount) and two dimensions customer and Date. I want calculate ratio of (count of customers who create 80 percent of Commission Amount) to (count of total customer) It is important to say that customers are sorted base on their Commission Amount How can solve this problem? And what must use to solve this query? 回答1: You want to use the TopPercent() function here: TopPercent( existing [Customer].[Customer].[Customer].Members, 80, [Measures].

Find min value of member, MDX

陌路散爱 提交于 2019-12-12 04:19:06
问题 Just started to explore MDX. Can anyone help me to get below result. Looking to build a MDX query which gives same out as below SQL query select max(date),min(date) from Fiscal_calendar Where : 1. Fiscal_Calendar is dimension in cube 2. date is the attribute 回答1: Min Date will be the First Child of the [All] member while Max Date will be the Last Child. SELECT {Fiscal_Calendar.Date.[All].FirstChild, Fiscal_Calendar.Date.[All].LastChild} ON 1, {} ON 0 FROM [YourCube] Second last child: Fiscal

Calculating Quartiles in Analysis Services

自作多情 提交于 2019-12-12 03:59:22
问题 I´m using MDX code to calculate quartile, , like in this blog: https://electrovoid.wordpress.com/2011/06/24/ssas-quartile/ That is what I´m doing: WITH SET OrderedData AS ORDER ( NONEMPTY ( [Dim Parameter].[id].[id] *[Dim Result].[Id].[Id].ALLMEMBERS, [Measures].[Value] ), [Measures].[Value], BASC ) MEMBER [Measures].[RowCount] AS COUNT (OrderedData) MEMBER [Measures].[i25] AS ( .25 * ( [RowCount] - 1 ) ) + 1 MEMBER [Measures].[i25Lo] AS FIX([i25]) - 1 MEMBER [Measures].[i25Rem] AS ([i25] -

how to get min or max date on columns in mdx query

﹥>﹥吖頭↗ 提交于 2019-12-12 03:32:28
问题 what mdx query logic could i implement for this example to get two rows in result set for hrid = 1 with 1/1/16 as min date(start) for first row where someattribut shows up on column with value 'A' and 1/15/16 as min date(start) for second row where someattribute has value of 'B' and measure.whatevers has its aggregation for whatever data corresponds to that dimension row. Im trying to just look at january 2016 everything ive tried i seem to get min date values of 1/1/1900 or both rows have

Change the context with Subselect MDX from Excel client

纵饮孤独 提交于 2019-12-12 02:24:55
问题 I have two time dimensions, production period and accounting period, and a measure that I want to aggregate with either dimension but not with both when users query the cube from excel. To do that I created a flag measure to check if both dimensions are being used CREATE MEMBER CURRENTCUBE.[Measures].[AcctProdFlag] AS IIF ( [DIM Accounting Period].[Accounting Period Hierarchy].CURRENTMEMBER.level.ordinal <> 0 and [DIM Production Period].[Production Month Hierarchy].currentmember.level.ordinal

MDX queries. How can to solve “IN” in “where” part

自古美人都是妖i 提交于 2019-12-12 02:08:18
问题 I have sql query and i need this query execute in olap cube . select count(distinct mi.id) from [MTD_DEV].[dbo].[MenuItemAttributes] as m inner join [dbo].[MenuItemOlds] as mi on mi.id = m.MenuItemId inner join [dbo].[RestaurantlistItems] as rl on rl.RestaurantId = mi.RestaurantId where m.AttributeId = 31 and rl.RestaurantListId = 69 and mi.PeriodId = 99 and m.MenuItemId in (select MenuItemId from [MTD_DEV].[dbo].[MenuItemAttributes] where AttributeId = 6 and i have working mdx query and I

Execution order of crossjoined hierarchies

佐手、 提交于 2019-12-12 01:50:04
问题 If I create a set of tuples via the following crossjoin which hierarchy is joined to which first? hierA * hierB * hierC If I know that the count of non empty members in A and B are significantly less than the count of members in C then should this influence the order? 回答1: It depends on the execution system used, i.e. how crossjoining on axis is optimized by compiler. Anyway, you will get real boost only if you first reduce cube size with subselect - it will prevent crossjoining non-matching