Advise on median MDX query and/or dimension hierarchy setup

Hey guys,
I have a fairly weird situation with SSAS/Dimension Hierarchies and an MDX based median-calculation that is actually not working as I would like it to work.
Hierarchy
 - State
 - County
 - Town
 - Neighborhood
 - Filing Date
 - Usage Category
 - TransactionID (PRIMARY KEY)
I have a hierarchy set up which shall be used in order drill down the cube. The median, which shall be calculated based off the Sales Price measure and all the affected records, shall be available at every single level of the hierarchy. That is also why
I decided to use a hierarchy: I am at least not aware of a do-able alternative that would allow to use any available dimension without a hierarchy and calculate the median dynamically based off on that.
This is the MDX expression I use in order to calculate the median.
Median
      NONEMPTY(EXISTING Descendants( [Statistics Hierachy1].[Hierarchy].CurrentMember,
                   [Statistics Hierachy1].[Hierarchy].[Transaction Id])),
        [Measures].[Sale Price]
It works, and the numbers are correct, but it is way too slow in order to use it properly.
The hierarchy of dimension states that there is no relationship between the attributes of the hierarchy. That is right, because every single attribute is an attribute to the primary key (TransactionId).
So for me there are three ways to solve this:
 1) Set up relationships. That, for some reason, brings up only a very limited subset of my data. Not sure why?
 2) Get the hierarchy to work properly so it calculates the underlying median FASTER!
 3) Set up a different measure (maybe my MDX is totally wrong?) to calculate the median the right way? In the end the median needs to be calculated based off on all underlying transactions that make up to the current level of the hierarchy.
In the end we are not talking about a ultra-large cube. Right now it only has like 3.1 Million rows in its one single partition.
Can anybody of you help me to address either the issue I am facing with the hierarchy (one I set up the relations I only see a subset of data) and/or let me know how to set up the median measure the right way ?
Thanks in advance! I really appreciate any help!
Thanks,
Lars

Hi L,
I would encourage you to set up the attribute hierarchies.  That will make your calculation much faster, the further down the user is in the hierarchy.  This is because the nonempty set you are getting the median from will be much smaller.
As you point out, to have an attribute hierarhcy, you need to have keys that cascade down, which you haven't got, at least yet.  One simple way around this is to use composite keys all the way down the hierarchy.  ie. State just has State as key,
County has State and County as key, Town has State, County and Town in key etc.  I can assure you that this will make you calc much faster down the hierarchy.
One side effect you will have is that attributes will now be unique based on their parents.  Two towns with the same name in different states or counties will appear as separate towns.  You may or may not want this.  If you don't want it,
simply have two Town attributes, call one TownKey (with composite key) which will be invisible as an attribute but used in the hierarchy.  The other Town attribute simply has Town as the key, so it can be used as an attribute on its own.  Town attribute
can be an attribute of TownKey. 
Hope that makes sense,
Richard

Similar Messages

  • Alternative for result from other query  and merge dimension option option

    Hi Everyone ,
    Am Developing one webi report over bex Query.
    Actual scenario is output of one webi report should be the input of other webi report.
    Eg:
    Table 1
    2010        Cus 1
    2010        Cus 2
    2011        Cus 3
    table 2
    cus1    m1   100
    cus2    m2   200
    Cus3    m1  400
    Report 1 designing 
    First report created using table 1 and prompt for year
    Report  2 designing
    Second report created using table2 and prompt for customer
    So when am Running first report it will ask for parameter year and if am selecting 2010 then the report will return C1 and C2
    this out put should e the input for report 2.
    So out put will be 100+200=300
    NOTE:1. Result from other query is not working in webi filter pane since am building on olap universe.
               2. Merge Dimension performance is very slow .
    Any Solution ?
    Regards,
    Kannan.B

    Hi,
    Thanks for ur reply
    As you said , If am giving hyperlink to other report .
    Eg: User selected Tamilnadu then report 1 opened  then  he has to click the some cell or hyperlink cell to view the actual report(2nd report).
    Suppose user Clicked that hyperlink cell and 2nd report opened and he is viewing the data for Tamil nadu and he decided to see the report for
    Andrapradesh so according to this logic he has to select first report and refresh the data for Andra and from there he has to come to 2nd report.
    totally 4 screen will be opened for seeing the two states report.
    So Some other alternative.......

  • 2 date columns and one dimension hierarchy

    Hi,
    I have one question in OBIEE 10g.
    I have one dimension table with 2 date columns (insertedOn, updatedOn)
    I created insertedOnYear, insertedOnMonth and updatedOnYear, updatedOnMonth columns from my date columns.
    I have hierarchy
    Year -> Month -> Day for that dimension table
    and I would like to dril down both columns insertedOnYear and updatedOnYear
    insertedOnYear -> insertedOnMonth -> insertedOn
    updatedOnYear-> updatedOnMonth -> updatedOn
    I am able to do it only for one of these columns and not for both.
    I can place both columns to appropriate levels, but drilling doesn´t work as I want
    Can you tell me how to solve my problem?

    Oops, I was talking about 11G. Ok no problem. Do this. In the physical layer, cretea 2 alias tables. Both pointing to the table where you have these 2 fields. The put everything in your BMM. There create the 2 hierarchies using the 2 different tables (that will point to the 2 alias tables create in the physical layer). This will make them unique.

  • MDX Query to combine different hierarchy levels

    I have a cube that contains a dimension called "FirmBranch" that contains "Branch Name" as the leaf level attribute. It also contains an attribute called "Market" which is the market a branch rolls up to. My measures are "Firm"
    (the value for the host firm's branch at the lowest level), "OtherFirm" (the value for all other firms excluding the host firm - think of this as the host firm's peers), and "AllFirm" (Firm and OtherFirm combined). If I have a particular
    host firm on the slicer (which is another dimension called "SubjectFirm" related to "FirmBranch" via a many-to-many bridge table), Branch Name as part of the rows and I put Firm and OtherFirm as columns I always get
    NULL for OtherFirm. When I'm looking at the lowest level a branch either belongs to the host firm or it belongs to one of the "other" peer firms. Since I have the host firm on the slicer all of the branches belong to this firm so it does not display
    anything for OtherFirm.
    My question is - how can I get the higher level "OtherFirm" totaled at the Market level to display alongside the Firm value when looking at it at the Branch level?

    sorry, try switching the calculated measure
    ([Customer].[Customer].[All],[Measures].[Internet
    Sales Amount])

  • Dimension Hierarchy Setup

    Hi
    I am new to BusinessIntelligence.
    I have business model 3 dimension table(package, incident, product) and one fact table. I want to apply hierarchy in a order of package #, incident# and product #.
    I right click businessmodel and select new object->Dimension
    I applied in the order and last level as product #.
    When I did chekc consistency it throws error as....
    BUSINESS MODEL IDS:
    [nQSError: 15001] Could not load navigation space for subject area IDS.
    [nQSError: 15003] Missing most detailed table for dimension tables: [Incident,Package].
    Please let me know If I miss something

    Dimension hierarchies can only use one Logical Dim table.. It sounds like you trying to build a hierarchy that contains 3 different logical dim tables ?
    If so, create 3 individual hierachies and use the 'prefered drill path' to jump from one to the other, in the order you want ( package -> incident -> product )

  • How to union results from 3 different dimensions in where clause with or - Mdx query

    Hi 
    I have a MDX Query and i need to pass the variable values to it by dynamically.
    Each time it will get any one attribute from three dimensions.
    Select 
    {} ON Columns,
    {} ON Rows 
    From
    Cube
    Where
    [Dimension1].[Attribut].&[Value]
    or
    [Dimension2].[Attribut2].&[Value]
    or
    [Dimension3].[Attribut3].&[Value]
    So It is working for two different values by using union and cross join.
    Can you please provide the solution ..
    Thanks in advance

    Hi Philip
    Thanks for replying me.
    I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
    SELECT
    {[Measures].[Internet Sales Amount] } ON 0,
    NON EMPTY
    {[Customer].[Gender].allmembers } ON 1 -- Used
    FROM
    [Adventure Works]
    WHERE
    [Customer].[Gender].&[M]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].&[XL]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].&[Australia]
    Can you provide alternate ways to get resolved.
    Thanks in advance

  • MDX Query generated by CR does not work

    Hi Everybody,
    I'm running CR 12.3.0.601Client against SAP_BW 701on SAP EHP 1 for SAP NetWeaver 7.0.
    I connect to the SAP System via <SAP BW MDX QUERY> and <Cubes> directly to a Multiprovider (as non of my Queries is populated below the Queries Node.)
    The Multiprovider contains a basic balance sheet concept including a hierarchy for the balance positions I want to display in my report.
    The structure of the Cube is populated correctly in the Field Explorer.
    Accordingly I drag and drop the balance positons (figures for assets (100), currentassets(120), liabilities(80), etc...) and the balance position types (values for assets like 'A', currentassets 'CA', etc...) to the detailed section, what works fine so far.
    However, as soon as I create a group on the NodeID I cannot see any data in the preview. By running the SQL Query, copied from Database->Show SQL Query Window in the Transaction MDXTEST I receive the error message below:
    System error in program CL_RSR_HIERARCHY and form MEMBERGET_FULL_2 (see long text)
    The Query created by CR is:
    SELECT {[Measures].[ZBSPOS]} ON COLUMNS,  NON EMPTY CROSSJOIN(EXCEPT([ZBSPOSTP].MEMBERS, {[ZBSPOSTP].[All]}), CROSSJOIN(EXCEPT([0FISCYEAR].MEMBERS, {[0FISCYEAR].[All]}), [ZBSPOSTP                      ZEVA_BSPSTP_H].MEMBERS)) DIMENSION PROPERTIES [0FISCYEAR].[20FISCYEAR], [ZBSPOSTP                      ZEVA_BSPSTP_H].[2ZBSPOSTP] ON ROWS FROM [$ZEVA_MP]
    Thanks for your help!
    Dominik

    Hey Ingo,
    Google and Searches in SDN did not return any results for "_MEMBER_GET_FULL_2", but I'm thankful for other sites, you recommend ;).
    Crystal Reports is Running on Version 12.3.0.601, ie. SP 3 without any FixPacks. Yet I'll run updates up to FP 3, just to be sure.
    Moreover, I'm not really sure what you mean by
    Did you also import the corresponding ABAP Transports ?
    I can query the cube with a BEx Query, so everything should be in the system, right?
    Just to be sure, please find the complete error message below. As a next step, I would try to find out, at what step the SAP program fails.
    System error in program CL_RSR_HIERARCHY and form MEMBERGET_FULL_2 (see long text)
    Message no. BRAIN299
    Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
    greetings

  • How to generate mdx query using C#

    I am new to mdx query and i am very curious about mdx query generation using c# so i searched for any demo or open source then i found
    Ranet.olap, which is providing what i need. After taking the dlls i tried to incorporate them in my code. I am pasting my full
    console code which should generate mdx query but it's not doing so, Am i doing something wrong.
    using System;
    using System.Collections.Generic;
    using Microsoft.AnalysisServices.AdomdClient;
    using Ranet.Olap.Core.Managers;
    using Ranet.Olap.Core.Metadata;
    using Ranet.Olap.Core.Types;
    namespace MDX
        class Program
            static void Main(string[] args)
                startWork();
            public static void startWork()
                string connString = "Provider=MSOLAP.3; Data Source=localhost;Initial Catalog=AdventureWorkDW2008R2;Integrated Security=SSPI;";
                CubeDef cubes;
                AdomdConnection conn = new AdomdConnection(connString);
                conn.Open();
                cubes = conn.Cubes.Find("AdventureWorkCube");
                Ranet.Olap.Core.Managers.MdxQueryBuilder mdx = new Ranet.Olap.Core.Managers.MdxQueryBuilder();
                mdx.Cube = cubes.Caption;
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listColumn = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listRow = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                List<Ranet.Olap.Core.Wrappers.AreaItemWrapper> listData = new List<Ranet.Olap.Core.Wrappers.AreaItemWrapper>();
                //Column area
                Dimension dmColumn = cubes.Dimensions.Find("Dim Product");
                Microsoft.AnalysisServices.AdomdClient.Hierarchy hColumn = dmColumn.Hierarchies["English Product Name"];
                //hierarchy properties
                List<PropertyInfo> lPropInfo = new List<PropertyInfo>();
                foreach (var prop in hColumn.Properties)
                    PropertyInfo p = new PropertyInfo();
                    p.Name = prop.Name;
                    p.Value = prop.Value;
                    lPropInfo.Add(p);
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIColumn = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIColumn.AreaItemType = AreaItemWrapperType.Hierarchy_AreaItemWrapper;
                areaIColumn.Caption = hColumn.Caption;
                areaIColumn.CustomProperties = lPropInfo;
                listColumn.Add(areaIColumn);
                //Rows Area
                Dimension dmRow = cubes.Dimensions.Find("Due Date");
                Microsoft.AnalysisServices.AdomdClient.Hierarchy hRow = dmRow.Hierarchies["English Month Name"];
                List<PropertyInfo> lRowPropInfo = new List<PropertyInfo>();
                foreach (var prop in hRow.Properties)
                    PropertyInfo p = new PropertyInfo(prop.Name,prop.Value);
                    lRowPropInfo.Add(p);
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIRow = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIRow.AreaItemType = AreaItemWrapperType.Hierarchy_AreaItemWrapper;
                areaIRow.Caption = hRow.Caption;
                areaIRow.CustomProperties = lRowPropInfo;
                listRow.Add(areaIRow);
                //Measure Area or Data Area
                Measure ms = cubes.Measures.Find("Order Quantity");
                Ranet.Olap.Core.Wrappers.AreaItemWrapper areaIData = new Ranet.Olap.Core.Wrappers.AreaItemWrapper();
                areaIData.AreaItemType = AreaItemWrapperType.Measure_AreaItemWrapper;
                areaIData.Caption = ms.Caption;
                List<PropertyInfo> lmpropInfo = new List<PropertyInfo>();
                foreach (var prop in ms.Properties)
                    PropertyInfo p = new PropertyInfo(prop.Name, prop.Value);
                    lmpropInfo.Add(p);
                areaIData.CustomProperties = lmpropInfo;
                listData.Add(areaIData);
                mdx.AreaWrappersColumns = listColumn;
                mdx.AreaWrappersRows = listRow;
                mdx.AreaWrappersData = listData;
                string mdxQuery = mdx.GenerateMdxQuery();
                conn.Close();

    Hi mkm1,
    According to your description, you want to use C# code to generate MDX Query. Right?
    In Analysis Servcies, we just need to use "Microsoft.AnalysisServices.AdomdClient.dll" to open connection to SSAS database and retrieve data from cube. Here are some sample code about executing MDX query using C#.
    Dim objConnection As New AdomdConnection("Data Source=localhost;Initial Catalog=Adventure Works DW 2008;")
    Dim objCommand As New AdomdCommand()
    Dim objDatatable As New DataTable
    Dim strCommand As String
    strCommand = "SELECT [Measures].[Internet Sales Amount] ON COLUMNS, "
    strCommand = strCommand & " [Date].[Calendar].[Calendar Year] ON ROWS"
    strCommand = strCommand & " FROM [Adventure Works]"
    objConnection.Open()
    objCommand.Connection = objConnection
    objCommand.CommandText = strCommand
    Dim objDataAdapter As New AdomdDataAdapter(objCommand)
    objDataAdapter.Fill(objDatatable)
    objConnection.Close()
    Since your code is more related to a third party API, we suggest you post your question to Rnet.
    Reference:
    Microsoft.AnalysisServices.AdomdClient Namespace
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Except function with parent child hierarchy using mdx query

    HI,
    I need to remove some items using mdx query in parent child hierarchy.
    I tried with below query,it is not removeing ,could you please help me.
    SELECT
    {[Measures].[Amount]} ON
    COLUMNS
     NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
    ON ROWS
    FROM (SELECT
    -Descendants({[Account].[Accounts].&[47]},,Leaves)
    } ON COLUMNS
    FROM [Adventure Works])
    indu

    Hi Indu,
    Why do you remove some itmes using
    Descendants function? Generally, we use FILTER function to achieve the requirement.
    WITH SET [CustomAccounts] AS
    FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
    SELECT {[Measures].[Internet Sales Amount]} ON 0
    [CustomAccounts] ON 1
    FROM [Adventure Works]
    WITH SET [CustomAccounts] AS
    FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
    SET [RemainingAccount] AS
    [Account].[Accounts].[Account Level 01]- [CustomAccounts]
    SELECT {[Measures].[Reseller Sales Amount]} ON 0
    [RemainingAccount] ON 1
    FROM [Adventure Works]
    Results.
    References.
    http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
    Regards,
    Charlie Liao
    If you have any feedback on our support,
    please click here.
    Charlie Liao
    TechNet Community Support

  • How to Find MDX Query

    Hi,
    I have created a WEBI report on an OLAP universe on top of a BEx query. Is it possible to see the MDX query being generated by my WEBI report? If yes, then could someone please guide me as to how do I see the exact MDX query generated by the report? Thanks!
    Regards,
    - Noman Jaffery

    Hi Ingo,
    Thanks for the answer. We are having an issue and I was wondering if you could shed somelight on this.
    Our WEBI report running on top of an OLAP Universe on BEx query is taking forever to run and in the end does not return any data.
    We are monitoring the query through BW and apparently it is stuck in the step:  CL_RSR_MDX_BXML_FLATTENING.
    Through logging we got the underlying MDX query and ran it in BEx Editor and it ran in seconds. But when the same MDX query in ran in BEx Editor using the XML option, it is stucking on the same step i.e. CL_RSR_MDX_BXML_FLATTENING
    My hunch is that the result is being converted into XML format from MDX native format before it is passed on to InfoView and this conversion/flattening is taking forever. Is it a known issue? Is there any way around? Thanks!
    - Noman Jaffery

  • MDX Query not retuern any data on my production server when i check service it is running

    Hi All,
    MDX Query not return any data  on my production server when i check service it is running. when i restart my service  i can able to run MDX Query and get data in my production server.

    Hi Mnishcal,
    According to your description, there is no data returned before restart Analysis Services, right?
    We haven't experiencing such issue before. And we cannot reproduce this issue. In your scenario, can you reproduce this issue? Here is a post which explains why you might not see the data you expect when browsing a SQL Server Analysis Services cube that
    processed successfully. Please refer to the link below.
    http://social.technet.microsoft.com/wiki/contents/articles/19744.ssas-troubleshooting-data-is-not-visible-when-browsing-a-cube.aspx
    Besides, are there any error on the log file? The msmdsrv.log file for the SSAS instance that can be found in \log folder of the instance. (C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log)
    Regards,
    Charlie Liao
    TechNet Community Support

  • SAP BW BEx query - WEBi MDX query

    Hi Experts, have we had some discussion on this?
    Does MDX query send by WEBi report to BW use the same program to extract data from BW database?
    One of the option for WEBi report source of data is to build Universe on top of BEx query. Could you share how this process actually happen.
    I think
    - WEBi query will pass parameters that is relevant for BEx query filter of the universe
    - the BEx query will then extract the data (following normal process if we run BEx query independently)
    - if WEBi has further filtering, it will then get the BEx result above and filter it further ..??
    So, how is MDX query come into the picture?
    Or is it:
    - WEBi query and the BEx query will determine what MDX query will be generated, and this MDX query will then fetch the data.
    But why BEx query extract data faster then MDX query?
    Sorry, i am new to this. hope someone could share some light here. In the meantime i continue to real those documentation and try to get some more ideas of what is actually happening.
    Thanks.

    Hi Thanks a lot for pointing this out.
    Did i understand it correctly that BEx query is using a different set of program (platform) to retrieve data compare to MDX query, and not MDX uses those program that is used by BEx to retrieve data from BW database and have extra steps on top of that?
    Can anyone share what is actually happen WEBi MDX query is executed (how the database is hit with SQL, and what are the tools to evaluate the efficiency of the WEBi (or the used BEx). As for BEx we have RSRT to analyze it right.
    And even to test the MDX query using MDXTEST and try to get the data from WEBi report, i found WEBi report still take considerably a lot longer. Why is this so? just because BO is a different system then BW?
    And as it's shared the BO 4.0 is using the same platform as BEx to retrieve data from BW database, does this mean we don't need to care about MDX usage in BW anymore as far as BO data extraction concern?
    Thank you very much.

  • Web intelligence and sap bw hierarchy

    Hi all,
    we are trying to build a report based on bex query and using bw hierarchy.
    We can create the report in an easy way with dimnesion customer (using hierarchy) and measure unit sales and it look pretty good. But when we add next dimension into our report the result isnt how we imagined. Take a look please at these two pictures. The first is how the report looks like now and the second is how it should look like.
    1. picture how it looks like now  -  http://img202.imageshack.us/img202/6708/sapbwhierarchyinwebi.jpg
    2. picture how it should look like  -  http://img507.imageshack.us/img507/7043/sapbwhierarchyinwebithi.jpg
    The dimension sales manager should be visible only on the bottom level of the customer hierarchy. Is it possible  ?
    Thanks for any help,
    regards Martin Zluky
    Edited by: Martin  Zluky on Oct 26, 2011 5:00 PM
    Edited by: Martin  Zluky on Oct 26, 2011 5:04 PM

    Hi Martin,
       you can try saving dimension in the hierachy in the universe designer and then saving and exporting it  and in webi you can check in scope of analysis/Drill whether it is drilled down or not to that level.
    hope this will help.
    regards
    laksh

  • SSRS report with tabular model – MDX query how to get the sum and count of measure and dimension respectively.

    Hello everyone,
    I am using the following MDX query on one of my SSRS report.
    SELECT NON EMPTY { [Measures].[Days Outstanding], [Measures].[Amt] } ON COLUMNS,
    NON EMPTY { ([Customer].[Customer].[Customer Key].ALLMEMBERS) }
    HAVING [Measures].[ Days Outstanding] > 60
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM ( SELECT ( STRTOSET(@Location, CONSTRAINED)) ON COLUMNS
    FROM ( SELECT ( {[Date].[Fiscal Period].&[2014-06]}) ON COLUMNS
    FROM [Model]))
    Over here, the data is being filtered always for current month and for a location that is being selected by user from a report selection parameter.
    I would like to get the count of total no. of customers and sum of the amount measure.
    When I am using them in calculated members it gives incorrect values. It considers all records (ignores the sub-select statements) instead of only the records of current month and selected location.
    I also tried with EXISTING keyword in calculated members but there is not difference in output. Finally, I manage the same at SSRS level.
    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Hi Ankit,
    We can use SUM function and COUNT function to sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension. Here is a sample query for you reference.
    WITH MEMBER [measures].[SumValue] AS
    SUM([Customer].[Customer].ALLMEMBERS,[Measures].[Internet Sales Amount])
    MEMBER [measures].[CountValue] AS
    COUNT([Customer].[Customer].ALLMEMBERS)
    MEMBER [Measures].[DimensionName] AS [Customer].NAME
    SELECT {[Measures].[DimensionName],[measures].[SumValue],[measures].[CountValue]} ON 0
    FROM [Adventure Works]
    Besides, you ask that does it make any difference if I manage it as SSRS level and not at MDX query level. I don't thinks it will make much difference. The total time to generate a reporting server report (RDL) can be divided into 3 elements:Time to retrieve
    the data (TimeDataRetrieval);Time to process the report (TimeProcessing);Time to render the report (TimeRendering). If you manage it on MDX query level, then the TimeDataRetrieval might a little longer. If you manage it on report level, then the TimeProcessing
    or TimeRendering time might a little longer. You can test it on you report with following query: 
    SELECT Itempath, TimeStart,TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount],Source
    FROM ExecutionLog3
    WHERE itempath like '%reportname'
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSRS MDX Query Dimension Properties Missing

    I have been stumped on this for a few days thought I'd throw this out here. I've read every related article in the forum regarding MDX Queries and Dimension Properties in SSRS Report Developer and haven't found a case exactly like this with a solution that
    works.
    Environment is SQL 2012 SP1 Cum update 5
    I am doing a rather generic query out of MS Project Servers OLAP cube and I can't get the dimension properties to show up in the flattened output for my dataset. See below.
    SELECT
    NON EMPTY { [Measures].[FTE est] } ON COLUMNS,
    NON EMPTY {
    [Value_Stream_Project].[Value_Stream_Project].ALLMEMBERS *
    [Project Status_Project].[Project Status_Project].ALLMEMBERS *
    DESCENDANTS([Project List].[Project List Level 02].ALLMEMBERS)*
    DESCENDANTS([ProjectManager_Project].[ProjectManager_Project Level 02].ALLMEMBERS) *
    [Planner_Project].[Planner_Project].ALLMEMBERS *
    [Time].[Month].ALLMEMBERS
    DIMENSION PROPERTIES
    MEMBER_CAPTION,
    MEMBER_UNIQUE_NAME,
    PARENT_UNIQUE_NAME,
    LEVEL_NUMBER ,
    [Project List].[Project List Level 02].[Start Date],
    [Project List].[Project List Level 02].[Finish Date]
    ON ROWS
    FROM (
    SELECT ( STRTOMEMBER(@FromTime, CONSTRAINED) : STRTOMEMBER(@ToTime, CONSTRAINED) ) ON COLUMNS
    FROM (
    SELECT ( STRTOSET(@RBSResource, CONSTRAINED) ) ON COLUMNS
    FROM (
    SELECT ( STRTOSET(@ProjectStatusProject, CONSTRAINED) ) ON COLUMNS
    FROM (
    SELECT ( STRTOSET(@ValueStreamProject, CONSTRAINED) ) ON COLUMNS
    FROM [MSP_Portfolio_Analyzer]))))
    My issue is the [Project List Level 02] dimension Properties  (below) are not showing up in the Query designer output, aren't being generated as fields in the dataset and can't be referenced as a property in an expression (i.e. Fields!Project_List("Start
    Date") )
    [Project List].[Project List Level 02].[Start Date],
    [Project List].[Project List Level 02].[Finish Date]
    The odd part is if I change the above two rows in my query to this :
    [Project List].[Start Date],
    [Project List].[Finish Date]
    The Query designer shows the properties in the output but leads to  2 other issues,
    1) I have to modify the generated Dataset field values to remove the [Project list Level 02] in the Level unique name like this
    Before<?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="MemberProperty" PropertyName="Project List - Start Date" LevelUniqueName="[Project List].[Project List Level 02]" />
    After
    <?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="MemberProperty" PropertyName="Project List - Start Date" LevelUniqueName="[Project List]" />
    2) I have to restrict my cross join to only the current level (Level 02) or it expands the results to the parent hierarchy of the Project List dimension and skews my measure summaries.
    I've tested the query in SSMS directly and the properties are showing up just fine for those dimensions using the original syntax.
    Any help would be appreciated.

    Hi there,
    Which data source provider are you using?  Are the connection strings used in SSMS the same as SSRS? Doing a profiler trace against Analysis Services might point to differences in how the connection is made or query is parsed.
    This may help.
    http://www.sqlchick.com/entries/2011/10/23/pros-cons-of-using-the-ole-db-provider-for-ssas-100-when-rep.html
    Did you try using With clause to make a friendly name for the member properties?
    http://melick-rajee.blogspot.ca/2012/04/how-to-get-member-properties-in-mdx.html
    cheers,
    Andrew
    Andrew Sears, T4G Limited, http://www.performancepointing.com

Maybe you are looking for