mdx

Fast dynamic named set calculation

时光总嘲笑我的痴心妄想 提交于 2019-12-11 06:23:24
问题 I have a long complex query with a lot of calculations and conditions but the main structure looks like this: WITH MEMBER [Id1] AS [Level].[Level1].CurrentMember.Member_Key MEMBER [Id2] AS [Level].[Level2].CurrentMember.Member_Key MEMBER [Level].[Level1].[FirstSet] AS NULL MEMBER [Level].[Level1].[SecondSet] AS NULL SET [Set 1] AS {some processed set members} SET [Set 2] AS {some other processed set members} SET [Common CrossJoin Set] AS [Level].[Level2].Members MEMBER [Calculated Measure 1]

MDX - Creating a dynamic grouping member?

旧街凉风 提交于 2019-12-11 06:13:09
问题 Category {A,B,C} Value Currently I can get: Category Value -------- ----- A 100 B 200 C 300 What I'd like to get is: Category Value -------- ----- A 100 B 200 C 300 D 500 Where D is the value of B + C. 回答1: Wow, this was actually incredibly easy... with member [Category].[Name].[D] as [Category].[Name].[B] + [Category].[Name].[C] select {[Measures].[Value]} on columns, [Category].[Name].allmembers on rows from [Cube] Result: Category Value -------- ----- A 100 B 200 C 300 D 500 来源: https:/

SpagoBI OLAP report passing optional parameter

不羁的心 提交于 2019-12-11 06:05:52
问题 Helo. Today is my another fight day with OLAP raport with optional parameter. I have problem with MDX query. I wrote it like this: select NON EMPTY {{[Measures].[VALUE]}} ON COLUMNS, NON EMPTY { IIF(ISEMPTY([CUSTOMER].[${param}]) //CHECKING IF PARAMETER IS EMPTY ,{[CUSTOMER].[COUNTRY].Members}, {[CUSTOMER].[${param}]} ) }ON ROWS from [TRANSACTIONS] ${param} is my optional parameter for [CUSTOMER].[COUNTRY] . I unchecked "required" check button for my parameter, so OLAP should have all [VALUE]

Stop VBA-Script from “freezing” while sending MDX-Query

久未见 提交于 2019-12-11 05:26:07
问题 I am using ADOMD 6.1 in an Excel 2010 Environment to send custom MDX Queries to an Analysis Services 2008 R2 Cube and to display the results in the excel workbook. This works fine so far, however the Excel instance is freezing while it waits for the Analysis Services Server to return the query result, and some of the queries may probably run for several minutes. I would probably use threading to outsource the Connection into another thread, but according to some other questions asked around

How can I find out the datatype of measures in MDX?

天大地大妈咪最大 提交于 2019-12-11 04:23:55
问题 I am new to Microsoft SQL Server Analysis Services and MDX. How can I find out the datatype of measures in MDX? The measures I am trying to find the datatype for are defined using a WITH clause which as I understand means that it is possible for each measure to have multiple datatypes. 回答1: How about the TypeName function: WITH Member [Measures].[My Type] as TypeName([Measures].[My Other Measure]) Etc... You are correct that each cell can be a different type of you have a calculations. 回答2:

MDX query to calculate measure with AND condition by members from same dimension

自闭症网瘾萝莉.ら 提交于 2019-12-11 04:12:15
问题 I have cube within OLAP database (SSAS 2012) where [Persons], [Dates] (date of order), [Categories] (category of item within order) are dimensions and [Orders], [OrdersCategories] are fact tables. [OrdersCategories] is many-to-many table to connect orders with categiries. Using query: SELECT {[Measures].[Orders Distinct Count]} ON COLUMNS, {[Persons].[Id].Children} ON ROWS FROM [DB] WHERE ( {[Dates].[Id].&[2015-06-11T00:00:00] : [Dates].[Id].&[2015-06-17T00:00:00]}, {[Categories].[Id].&[10],

Calculated Member for the TOTAL of a measure for multiple Dimensions

邮差的信 提交于 2019-12-11 03:51:53
问题 I am trying to TOTAL a measure with a calculated measure AS CALCULATE; CREATE MEMBER CURRENTCUBE.[Measures].[Total On Hand Amount] AS ([Warehouses].[Warehouses].[All],[Measures].[On Hand Amount]), FORMAT_STRING = "#,#", VISIBLE = 1; This is working when I have warehouse Dimension selected but I want to make it dynamic so that it would work for any other dimensions/hierarchies as well without them being added to the code. Any help is appreciated!! 回答1: I think you want to use Root CALCULATE;

Difference in results while using .CHILDREN and .ALLMEMBERS in an MDX statement

匆匆过客 提交于 2019-12-11 03:35:45
问题 I have two almost similar MDX queries, in one I am using .CHILDREN and in other .ALLMEMBERS. First one returns no rows, the second one returns two. Please help me in understanding why! Query 1 select [Measures].[Claim As Of - Count] on 0, [Accident Date].[Year].allmembers on 1 from [AW Cube] where [Accident Date].[Year-Quarter-Month-Date].[Year].&[2010] ---2 rows Query 2 select [Measures].[Claim As Of - Count] on 0, [Accident Date].[Year].children on 1 from [AW Cube] where [Accident Date].

MDX filtering by multiple dimension members

浪尽此生 提交于 2019-12-11 03:35:31
问题 Problem I need to create a report which will list a number of accounts that match certain criteria - simulationDate , statisticPeriod , region . Right now my query looks like this: WITH MEMBER [Measures].[Count] as 1 SELECT [Measures].[Count] ON COLUMNS, NON EMPTY Crossjoin( [Account].[Account Number].ALLMEMBERS, {[simulationDate].[day].&[10010101]}, {[statisticPeriod].[period].&[201201]}, {[region].[code].&[SO]} ) ON COLUMNS FROM [myWH] Is this cross-dimensional filtering okay? 回答1: This is

Find data for each subsequent financial period year in mdx query

爷,独闯天下 提交于 2019-12-11 03:23:58
问题 In my database cube, data is distributed like this, for each quarter, per year 2005 - > Q1 -> 10 2006 - > Q1 -> 4 2007 -> Q1-> 4 Q2 -> 20 Q2 -> 4 Q2-> 44 Q3 -> 5 Q3 -> 4 Q3-> 3 Q4 -> 4 Q4 -> 4 Q4-> 3 For financial year 2006 & 2007 i need to fetch data from 2005 -> Q2,Q3,Q4 & Q1 of 2006 ie, 20, 5,4,4 2006 -> Q2,Q3,Q4 & Q1 of 2007 ie, 4,4,4,4 I have build mdx query like this - : WITH MEMBER [LTII_NIRS_E] AS SUM({[DIM TIME].[YEAR - QUARTER - MONTH].[YEAR].[2005].[Q2]:[DIM TIME].[YEAR - QUARTER -