Accumulated and interannual ssas mdx

Hello!
I'm (more than) new in the issue of SSAS and MDX and I have seen several examples for calculating accumulated sounding Chinese to me. In these examples illustrate that the function that could / should be used is PeriodsToDate or Ydt,  but I can not display
anything (no errors, but the result is NULL). I created several tests calculated members for use in SSRS and excel. These are three of the many tests that have been made ​​without success:
CREATE MEMBER CURRENTCUBE.[Measures].prueba_acum
AS sum([Measures].[IMPORTE GASTO],YTD([Dim Tiempo].[Año])),
FORMAT_STRING = "Standard",
VISIBLE = 1 ;
CREATE MEMBER CURRENTCUBE.[Measures].prueba_acum_2
AS sum([Measures].[IMPORTE GASTO],
PeriodsToDate(
[Dim Tiempo].[Año],
[Dim Tiempo].[Mes].currentmember
VISIBLE = 1 ;
CREATE MEMBER CURRENTCUBE.[Measures].prueba_acum_4
AS SUM([Measures].[IMPORTE GASTO],YTD([TBP5 Dim Tiempo].[Mes].CurrentMember)),
VISIBLE = 1 ;
What I need to get with the calculated members are:
- Accumulated current year: For MARCH month, the total amount from January to March for the selected year.
- Accumulated last year: For MARCH month, the total total amount from January to March before the selected year.
- Interannual: For MARCH month, the total amount from the previous MARCH to FEBRUARY of the selected year.
Any clue will be helpful!
Thank you!
(sql server 2012, visual studio 10)

Hello trinity9,
As there is no date ” Calender  Month of year” configured in the adventure works I will illustrate using “week of year”  In the example below , you will find a the accumulative amount till a chosen week for each year.
Accumulated current year:
WITH
MEMBER [Measures].[Year to Date Reseller Sales] AS
Aggregate
PeriodsToDate
[Date].[calendar Weeks].[calendar Year]
,Exists
Exists
[Date].[calendar Weeks].[calendar Week]
,[Date].[calendar Week of Year].&[27]
,[Date].[calendar].CurrentMember
).Item(0)
,[Measures].[Reseller Sales Amount]
SELECT
[Measures].[Reseller Sales Amount]
,[Measures].[Year to Date Reseller Sales]
} ON COLUMNS
,{[Date].[calendar Year].[calendar Year].MEMBERS} ON ROWS
FROM [Adventure Works];
Accumulated last year:  take  [Date].[calendar].CurrentMember.PrevMember
 instead
Interannual: You have to sum two PeriodsToDate calculations
Philip,

Similar Messages

  • How to use MAX function in SSAS MDX Query

    I want to run this Query with MAX Condition on LAST_DATA_UPDATE Column .

    Hi Ashishsingh,
    According to your description, you want to know how to use MAX function in SQL Server Analysis Services MDX Query, right? In this case, please refer to the link below which describe the syntax and sample of MDX function.
    http://technet.microsoft.com/en-us/library/ms145601.aspx
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=64
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Trouble with Accumulation and percent calculation

    I'm fairly new to programming so please be gentle guys because I know this may seem like a stupid question. In this simple polling program I have written, I can not seem to get my number of votes to accumulate nor the percent to calculate and display correctly.
    Could some one please tell me what I'm doing wrong and possibly lend me some tips for future programs. 
       static void Main(string[] args)
                string[] candidates = new string[5] { "Hillary Clinton", "Barack Obama", "John McCain", "Ralph Nader", "None of these are my favorite" };
                double totalVote = 0,
                votePercent = 0;
                int choice1 = 0,
                    choice2 = 0,
                    choice3 = 0,
                    choice4 = 0,
                    choice5 = 0, numOfVotes = 0, VoteSelect = 0;
                char altPoll;
                do
                    Console.WriteLine("Opinion Poll with Functions\n\n");
                    Console.WriteLine("***********OPINION POLL***********");
                    for (int i = 0; i < 5; i++)
                        Console.WriteLine(candidates[i]);
                    Console.Write("\nPlease choose your favorite candidate based on its corresponding number=> ");
                    VoteSelect = (Convert.ToInt32(Console.ReadLine()));
                    Console.WriteLine("\nQuestion....\n");
                    Console.Write("Would you like to do this again (y/n): ");
                    altPoll = (Convert.ToChar(Console.ReadLine()));
                while (altPoll == 'y' || altPoll == 'Y');
                if (altPoll == 'n' || altPoll == 'N')
                    if (VoteSelect == 1)
                        numOfVotes += choice1++;
                    if (VoteSelect == 2)
                        numOfVotes += choice2++;
                    if (VoteSelect == 3)
                        numOfVotes += choice3++;
                    if (VoteSelect == 4)
                        numOfVotes += choice4++;
                    if (VoteSelect == 5)
                        numOfVotes += choice5++;
                    totalVote += numOfVotes;
                    votePercent = VoteSelect/ totalVote;
                Console.WriteLine("\nCANDIDATE\t\tVOTES\t\tPERCENTAGE");
                Console.WriteLine("____________________________________________________");
                Console.WriteLine("Hilary Clinton \t\t  {0} \t\t{1:P}",choice1,votePercent);
                Console.WriteLine("Barack Obama   \t\t  {0} \t\t{1:P}",choice2,votePercent);
                Console.WriteLine("John McCain    \t\t  {0} \t\t{1:P}",choice3,votePercent);
                Console.WriteLine("Ralph Nader    \t\t  {0} \t\t{1:P}",choice4,votePercent);
                Console.WriteLine("Not Offered    \t\t  {0} \t\t{1:P}",choice5,votePercent);

    Hi Billy,
    What you're doing wrong is that in the do/while loop, you're not calculating anything. You do the calculations once the user has said they're done, but you're only capturing one choice in your do/while loop, consequently, their last choice is the only one
    used in your calculations.
    You should put some of the calculations in a separate method, and call it from within your do/while loop. Also, use a switch/case:
    static void SumSelections()
    totalVote++;
    switch (VoteSelect)
    case 1:
    choice1++;
    break;
    case 2:
    choice2++;
    break;
    case 3:
    choice3++;
    break;
    case 4:
    choice4++;
    break;
    case 5:
    choice5++;
    break;
    default:
    totalVote--;
    break;
    Then, your do/while becomes this:
    do
    Console.WriteLine("Opinion Poll with Functions\n\n");
    Console.WriteLine("***********OPINION POLL***********");
    for (int i = 0; i < 5; i++)
    Console.WriteLine(candidates[i]);
    Console.Write("\nPlease choose your favorite candidate based on its corresponding number=> ");
    VoteSelect = (Convert.ToInt32(Console.ReadLine()));
    SumSelections(); // I added this
    Console.WriteLine("\nQuestion....\n");
    Console.Write("Would you like to do this again (y/n): ");
    altPoll = (Convert.ToChar(Console.ReadLine()));
    while (altPoll == 'y' || altPoll == 'Y');
    And after the do/while (you won't need to check for 'n' or 'N'), just do this:
    Console.WriteLine("\nCANDIDATE\t\tVOTES\t\tPERCENTAGE");
    Console.WriteLine("____________________________________________________");
    Console.WriteLine("Hilary Clinton \t\t {0} \t\t{1:P}",choice1, (double)(choice1/totalVote));
    Console.WriteLine("Barack Obama \t\t {0} \t\t{1:P}",choice2, (double)(choice2/totalVote));
    Console.WriteLine("John McCain \t\t {0} \t\t{1:P}",choice3, (double)(choice3/totalVote));
    Console.WriteLine("Ralph Nader \t\t {0} \t\t{1:P}",choice4, (double)(choice4/totalVote));
    Console.WriteLine("Not Offered \t\t {0} \t\t{1:P}",choice5, (double)(choice5/totalVote));
    UPDATE: I've got the double cast wrong, Magnus has it correct (cast each to double before dividing).
    ~~Bonnie DeWitt [C# MVP]
    http://geek-goddess-bonnie.blogspot.com

  • 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

  • YTD and accumul. depreciation have the same value when dpis is 2 years ago

    Hi all
    I am using FA and i have some problems. I have just setup this module and now i want to migrate assets in the system. The customer gave me an excel with the following fields that want to be in the system like: asset cost, accumulated depreciation, date placed in service, ytd accumulation and so on.
    the problems are:
    1) when i want to enter new asset manually the ytd depreciation and accumulated depreciation are required to be equal. ok so far, i register new asset on test environment and when i enter the date placed in service for example two years ago (because that is the real date placed in service of the asset) and run depreciation, the system has calculated correctly the accumulated depreciation, but has calculated the same value even for YTD depreciation which is not true, because in this case accumulated depreciation and ytd depreciation are completely different. how to solve this problem? How can i put correct values in this fields?
    2) when i enter these assets directly in the fa_mass_additions table according to the fixed assets user guide, i have the following errors: when i put "ON HOLD" on queue name, and open these assets on the system, the on hold field has no value (is empty)
    When i try to run post mass additions, the report is not finding the parameter (book) because the system is giving en error message telling me that there is no value in this list of values
    please help to solve this problems because i am not being able to migrate assets for the company.
    Thank you and best regards

    gaskins,
    You may have different Color Settings, and if you use Pantone you should be aware that the whole interpretation has changed (a number of times, most radically recently).
    If you say more, more can be said.

  • SSRS report connecting SSAS 2014 cube not returning measure value

    Hi all
    Recently we migrated SSAS from 2008r2 to 2014 in Dev environment. when we are testing  SSRS reports which are connecting to that cube is having issue. the measure value is returning as [Measures].[LSM Count] instead of numeric value.
    when we connect to old cube in prod environment the report is working as expected and even the mdx query is working fine in  Management studio of new cube.  what would be the issue.
    WITH -- Daily Graphic
    MEMBER SelectedIndicator1 AS '[Measures].[LSM Count]'
    MEMBER SelectedIndicator2 AS '[Measures].[LSM Count]'
    MEMBER SelectedIndicator3 AS '[Measures].[LSM Count]'
    MEMBER SelectedIndicator4 AS '[Measures].[LSM Count]'
    SELECT NON EMPTY {SelectedIndicator1, SelectedIndicator2, SelectedIndicator3, SelectedIndicator4} ON COLUMNS,
    ([Date].[Date].[Date].ALLMEMBERS *EXCEPT([Time].[Time Hierarchy].[Twelfth Of Hour].ALLMEMBERS,[Time].[Time Hierarchy].[Twelfth Of Hour].&[00:00])*[Source 2013].[METRIC GROUP].[METRIC GROUP]*
    [Source 2013].[LocalDn].members)
    } ON ROWS
    FROM ( SELECT ( STRTOSET('[Date].[Date].[Date].&[2015-01-26T00:00:00]:[Date].[Date].[Date].&[2015-01-27T00:00:00]') ) ON COLUMNS
    FROM ( SELECT ( STRTOSET('{[Source 2013].[LOCALDN].&[PGMS1]&[LSM],[Source 2013].[LOCALDN].&[PMES1]&[LSM]}') ) ON COLUMNS
    FROM [IMS]))
    Surendra Thota

    Hi Surendra_Thota,
    According to your description, there are SSRS reports with SSAS data source, after you migrated SSAS from 2008 R2 to 2014, the measure value returned string instead of numeric value.
    I tried to reproduce the issue in my local machine of SQL Server 2014, but it works fine for me. As a workaround, please modify the query like below:
    SELECT
    NON EMPTY
    [Measures].[Internet Order Quantity],
    [Measures].[Internet Sales Amount]
    } ON COLUMNS,
    NON EMPTY
    [Customer].[Education].[Education].ALLMEMBERS *
    [Customer].[Home Owner].[Home Owner].ALLMEMBERS
    ) } ON ROWS
    FROM [Adventure Works]
    If the problem remain unresolved, i would appreciate it if you could sample data and screenshot of the report, it will help us move more quickly toward a solution.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • MDX calculation based on date logic for the Jan 1 of current year through the 15th of the previous month

    Hello, 
    We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario; 
    The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
    (the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
    The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
    SELECT
                    NON EMPTY { [Measures].[Revenue Amount],
                    [Measures].[Utilization],
                    [Measures].[AVG Revenue Rate],
                    [Measures].[Actual Hours] }
    ON
                    COLUMNS,
                    NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
    Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
                    MEMBER_UNIQUE_NAME
    ON
                    ROWS
    FROM
                    ( SELECT
    ( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
                    ON
                                    COLUMNS
                    FROM
                                    ( SELECT
    ( { [dimIsBillable].[Is Billable].&[True] } )
                                    ON
    COLUMNS
                                    FROM
    [SSASRBA]
    WHERE
                    ( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
                    BACK_COLOR,
                    FORE_COLOR,
                    FORMATTED_VALUE,
                    FORMAT_STRING,
                    FONT_NAME,
                    FONT_SIZE,
                    FONT_FLAGS

    Hi Hans,
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Regards,
    Simon Hou
    TechNet Community Support

  • Converting MDX query into SQL Server 2008

    We have MDX query based OLAP CUbes.
    To reduce MDX based dependenies, we have to convert MDX based cube to sql server 2008 based queries.
    For this I need expert advise to convert below query to sql server 2008 based query :
    CREATE MEMBER CURRENTCUBE.Measures.[Ack Lost]
                        AS 'Sum(PeriodsToDate([Time].[Year], [Time].CurrentMember ), [Measures].[Lost])',
                        FORMAT_STRING = "#,#",
                        VISIBLE = 1;

    Hi Sachin,
    According to your description, you need to convert the MDX query to T-SQL query, right?
    Your MDX query is calculated measure that return the total value from the first sibling and ending with the given member. In T-SQL query we can use the query as Yogisha provided to achieve the same requirement. Now you need to a tool to convert all the MDX
    related SSAS cube queries to MS SQL Server 2008 based queries.
    Although MDX has some similarities with T-SQL these languages are in many ways different. Beginning to learn and comprehend SQL Server Analysis Services (SSAS) MDX queries can be difficult after one has spent years writing queries in T-SQL. Currently, there
    is no such a tool to convert a MDX query to T-SQL query since the structure difference between MDX and T-SQL. So you need to convert them manually, please refer to the links below to see the details.
    http://www.mssqltips.com/sqlservertip/2916/comparison-of-queries-written-in-tsql-and-sql-server-mdx/
    https://sqlmate.wordpress.com/2013/11/12/t-sql-vs-mdx-2/
    http://technet.microsoft.com/en-us/library/aa216779(v=sql.80).aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSAS Cube Measures will not display for all associated dimensions in Excel client

    Dear All,
    Can you please clarify the below query to me?
    I have one Calculated Member CM1 and the expression used to calculate is:
    ([Dimension1].[HierarchyName1].CURRENTMEMBER.Prevmember,[Measures].[Amount]) associated to a Measure Group MG1.
    Dimension1 is having two Hierarchies HierarchyName1 and HierarchyName2.
    Measure CM1 is used to Calculate another calculated Member CM2 along with other Non Calculated measures and associated to the same Measure Group MG1.
    And the Measure Group MG1 is linked to other dimensions, Dimension2 and dimension3 as well.
    When I query the cube in Excel Client for the measure CM2, values appears only when the dimension Dimension1.HierarchyName1 is used to view the results.
    And values do not appear:
      When I do not use any dimensions (Only CM2 used to display in the excel)
      When I use Other dimensions linked i.e. Dimension2 and dimension3
      And Also does not display any values if the CM2 is used along with other hierarchy of same dimension1 i.e. HierarchyName2
    I don understand this concept OR Is this the concept how the tuples work in SSAS MDX?
    If a Calculated measure is created using a one of Dimension member, cannot we view that measure value along with other dimensions linked or when we do not use any dimension to view the results in excel?
    Can you please help me to understand this.
    Thanks in Advance and Regards.

    As you explained CM2 depends on CM1.
    The dependency for CM1 is "[Dimension1].[HierarchyName1].CURRENTMEMBER.Prevmember".
    So to get value for CM1 you need to bring HierarcyName1.
    So for CM2 also HierarcyName1
    has to be used only then the data will be visible. When HierarcyName1 is used you can play with
    the combinations of other dimension as well .
    http://www.bifeeds.com

  • MDX Query much slower for users without administrativ rights

    We have a SQL 2012 SP1 with CU9 installed and run a MDX query against a Cube. The Problem is that the query runs very slow for a user without administrativ persmission on the cube. With admin rights it takes 3 seconds and without 30 seconds. I can't find
    any error in the query so maybe someone can pin point me in the right direction.The Role has all reading information it needs.
    This is the Query:
    SELECT NON EMPTY { [Measures].[Blocked Consignment], [Measures].[Consignment in Inspection],
    [Measures].[Restricted Consignment], [Measures].[Unrestricted Consignment] } ON COLUMNS, NON EMPTY
    { ([Date].[Date].[Date].ALLMEMBERS * [Materials].[Part Number].[Part Number].ALLMEMBERS *
    [Materials].[Key].[Key].ALLMEMBERS * [Sold To].[Name].[Name].ALLMEMBERS *
    [Stock Information].[Plant - Storage Location].[Storage Location].ALLMEMBERS * [Non Zero].[Zero Stock Status].[Zero Stock Status].ALLMEMBERS ) }
    ON ROWS
    FROM ( SELECT ( STRTOSET("[Non Zero].[Zero Stock Status].&[No]", CONSTRAINED) )
    ON COLUMNS FROM ( SELECT ( STRTOSET("[Stock Information].[Storage Location].&[1090]", CONSTRAINED) )
    ON COLUMNS FROM ( SELECT ( STRTOSET("[Stock Information].[Plant].&[1090]", CONSTRAINED) )
    ON COLUMNS FROM ( SELECT ( STRTOSET("[Sold To].[Name].[All]", CONSTRAINED) )
    ON COLUMNS FROM [Stock Snapshot]))))
    WHERE ( IIF( STRTOSET("[Stock Information].[Plant].&[1090]", CONSTRAINED).Count = 1, STRTOSET("[Stock Information].[Plant].&[1090]", CONSTRAINED), [Stock Information].[Plant].currentmember ),
    IIF( STRTOSET("[Stock Information].[Storage Location].&[1090]", CONSTRAINED).Count = 1, STRTOSET("[Stock Information].[Storage Location].&[1090]", CONSTRAINED), [Stock Information].[Storage Location].currentmember ) )
    Any one came across this is or is it a bug?

    Can you check which build of SSAS you've got installed? It looks similar to this bug:
    http://support.microsoft.com/kb/2905298/en-us
    Apart from that, if you have used cell security in your role, it would be expected that query performance would be slower for users of that role.
    Chris
    Check out my MS BI blog I also do
    SSAS, PowerPivot, MDX and DAX consultancy
    and run public SQL Server and BI training courses in the UK

  • Excel Generating MDX Query With Crossjoins

    Hi All,
    I am having performance issues while using excel to browse SSAS cube.
    I ran the pro filer and captured the MDX queries and query which excel has auto generated has lot of cross joins 
    All i am doing is selecting 3 attributes in a dimension and i can't understand why excel is choosing to use cross joins
    Can any one please give me some options on how to make excel not use cross joins ?
    Query From BIDS :
    SELECT NON EMPTY { } ON COLUMNS, NON EMPTY { ([Orders].[Order No].[Order No].ALLMEMBERS * [Orders].[Order Status].[Order Status].ALLMEMBERS * [Orders].[Branch].[Branch].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [Sales_Detail]
    CELL PROPERTIES VALUE
    Query From Excel :
    SELECT 
    NON EMPTY CrossJoin(CrossJoin(Hierarchize({DrilldownLevel({[Orders].[Order No].[All]},,,INCLUDE_CALC_MEMBERS)}), Hierarchize({DrilldownLevel({[Orders].[Order Status].[All]},,,INCLUDE_CALC_MEMBERS)})), Hierarchize({DrilldownLevel({[Orders].[Branch].[All]},,,INCLUDE_CALC_MEMBERS)}))
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME,[Orders].[Order No].[Order No].[Branch],[Orders].[Order No].[Order No].[Legal Entity],[Orders].[Order No].[Order No].[Likelihood Of Deal],[Orders].[Order No].[Order No].[Order Status],[Orders].[Order
    No].[Order No].[Order Type],[Orders].[Order No].[Order No].[Products ID] ON COLUMNS  FROM [Sales_Detail] CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

    Hi Satish,
    According to your description, you find Excel using a lot of CROSSJOIN when driving data from cube. It caused bad performance and you want to avoid it. Right?
    This is a known issue in Excel, it uses a certain template to build the cross join. It uses DrillDown.... functions for complex user filter selection when doing drill down. It's the default behavior of Excel and it hasn't been fixed yet.
    In this scenario, I suggest you build user hierarchy in your cube and use it in Excel when retrieving data into pivot table.
    See a similar thread below:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/99a6a97f-518a-4fe6-b9bd-fa81f0a44587/controlling-the-mdx-constructed-by-excel-pivottables
    Reference:
    Binding an Excel table to the results of an MDX query
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Interacting with the ssas cube from a web application

    Hi All,
    I have a requirement in which we are using a web application to show the reports designed in ssrs. As of now we are hitting the Database and getting the reports. But now we have developed a cube and we want to display the reports from ssas Cube.
    My issue lies here.  How to populate the filter drop down lists from ssas Cube ( how to read the mdx format ).  Is there any way or work around to do it in ASP.Net..
    To be more clear the report output will be from ssrs dashboard. Filters should be populated from cube.
    Thanks in advance
    Regards
    Balaji - BI Developer

    Hello,
    You can use .NET AdoMd Client to connect to SSAS and to run MDX queries agains a cube; see
    ADOMD.NET Client Programming and
    Microsoft.AnalysisServices.AdomdClient Namespace
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Excel Pivot (molap) will not refresh from an SSAS box that is not part of the Farm

    I have spent hours trying to get this working going through many links.  One of the best ones is this.
    http://whitepages.unlimitedviz.com/2010/12/connecting-to-cubes-and-external-data-with-excel-in-sharepoint/
    However even after doing all of this it is still not working.  Here is my set up.  I have a sharepoint 2013.  I am trying to connect to my DW SSAS server that is on a different domain and not part of the farm.  Everything else seems to
    work but excel.  I have power view connecting and creating great reports with refesh working perfect.  I have performance point working.  I have Reporting Services working.  We installed adventureworks on the local SSAS farm version and
    excel is working with this and refreshed just fine.  I can ceate and excel report and save it to sharepoint but when I open it I get the famous error.
    An error occurred during an attempt to establish a connection to the external data source. The following connections failed to refresh:
    I can open in excel and then refresh all from excel and all works fine.  I do not want my users to have to go through this.  They should be able to use excel in sharepoint.  Any ideas on what I am missing.  I have tried to follow exactly
    what the link above says but still not working.
    Ken Craig

    The first article is checking to make sure power pivot is installed and local ssas is running. This could not be an issue since like I mentioned I can create a Excel report to the local farm version of ssas and it opens and refreshed fine.  That
    would mean that power pivot is installed and the services are running right:)?
    The second article I have done over and over and I am pretty sure this works.  Again I can export to excel and it works just fine meaning my Data source is valid right?  yes I have chosen "none" as well.
    The third article talks about the different viewers.  Mine is using
    xlviewer.aspx so I would assume this is not the issue. 
    Here is what I am seeing in the logs but I am not sure what they are saying.  I used uls view somewhat like you would profiler. I started it tried to open excel and then stopped it.  Below are logs that look like they pertain to this action.
    ConnectionManager.GetConnection: Failed to create new connection, exception=Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException: Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
    at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass8.<CreateConnection>b__5()   
    at Microsoft.Office.Excel.Server.CalculationServer.CredentialsTrustedSubsystem.TryExecuteImpersonated(ExecuteImpersonatedMethod method)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials, ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId), sessionId=1.V23.297S76/z2k/Evl+S78bqiKj14.5.en-US5.en-US36.5a800c6f-758b-44e2-a092-e592f15e09771.A1.N,
    connectionString=Provider=MSOLAP.5;Integrated Security=SSPI;Persist Security Info=True;Data Source=BIL-BIRSTDB\ASADMIN;Initial Catalog=Ecomm OLAP pool count=0
    ConnectionManager.GetConnection: Caught an exception: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException: Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
    at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass8.<CreateConnection>b__5()   
    at Microsoft.Office.Excel.Server.CalculationServer.CredentialsTrustedSubsystem.TryExecuteImpersonated(ExecuteImpersonatedMethod method)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials, ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnectionAndAddToList(ConnectionRequest connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Boolean auditConnection, Int32 keyLcid, ConnectionKey
    connectionKey, AutoReaderWriterLock autoPoolLock, Connection& connection, ConnectionList& connectionList)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.GetConnection(ConnectionRequest connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Int64 privateConnectionId, Boolean auditConnection)
    Refresh failed for 'BIL-BIRSTDB_ASADMIN Ecomm OLAP Report' in the workbook 'http://eagleviewportal/BusinessIntelligenceCenter/Templates/Ecomm Report Power Pivot Default.xlsx'. [Session: 1.V23.297S76/z2k/Evl+S78bqiKj14.5.en-US5.en-US36.5a800c6f-758b-44e2-a092-e592f15e09771.A1.N
    User: 0#.w|hqeagleview\ken.craig]
    ExternalSource.ValidateConnection: Unable to get a connection: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException: Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
    at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass8.<CreateConnection>b__5()   
    at Microsoft.Office.Excel.Server.CalculationServer.CredentialsTrustedSubsystem.TryExecuteImpersonated(ExecuteImpersonatedMethod method)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials, ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnectionAndAddToList(ConnectionRequest connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Boolean auditConnection, Int32 keyLcid, ConnectionKey
    connectionKey, AutoReaderWriterLock autoPoolLock, Connection& connection, ConnectionList& connectionList)   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.GetConnection(ConnectionRequest connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Int64 privateConnectionId, Boolean auditConnection)   
    at Microsoft.Office.Excel.Server.CalculationServer.ExternalSource.TryGetValidatedConnection(Request request, ConnectionRequest connectionRequest, ExternalDataScenario scenario, Credentials credentials, ExtendedConnectionInfo extendedConnectionInfo, Int64
    privateConnectionId, Boolean shouldReportFailure, Connection& connectionOut). sessionId=1.V23.297S76/z2k/Evl+S78bqiKj14.5.en-US5.en-US36.5a800c6f-758b-44e2-a092-e592f15e09771.A1.N, externalSource=BIL-BIRSTDB_ASADMIN Ecomm OLAP Report
    ExternalDataUtility.ExecuteOperation: We exhausted all available connection information. Exception: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInfoException: Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInfoException'
    was thrown.   
    at Microsoft.Office.Excel.Server.CalculationServer.ConnectionInfoManager.GetConnectionInfo(Request request, String connectionName, ExtendedConnectionInfo extendedConnInfo, Boolean& shouldReportFailure)   
    at Microsoft.Office.Excel.Server.CalculationServer.ExternalDataUtility.GetExtendedConnectionInfo(IExternalDataObject extObject, ConnectionInfoManager connectionInfoManager, Request request, Int32 externalSourceIndex, Boolean ignoreErrors, ExternalDataScenario
    scenario, Exception& lastException, Boolean& shouldReportFailure)   
    at Microsoft.Office.Excel.Server.CalculationServer.ExternalSource.GetConnection(ExternalKey externalKey, Int32 externalSourceIndex, ExternalQueryKey externalQueryKey, ConnectionRequest connectionRequest, Int64 privateConnectionId, ExternalDataScenario scenario,
    Boolean prepare), Data Connection Name: BIL-BIRSTDB_ASADMIN Ecomm OLAP Report, SessionId: 1.V23.297S76/z2k/Evl+S78bqiKj14.5.en-US5.en-US36.5a800c6f-758b-44e2-a092-e592f15e09771.A1.N, UserId: 0#.w|hqeagleview\ken.craig
    Ken Craig

  • Need help in MDX query

    Hi All 
    I am new to MDX language and need a MDX functions/query on the cube to get the required output, Given below is the scenario with the data. 
    I am maintaining the data in a table in dataMart with given structure. We have the data at day and weekly in a single table with granularity indicator and count is the measure group column. While loading the data in to mart table we are populaiting the week
    Key from week table and Month key from month table and joining in the cube.
    we need to calculate the inventory for a particular month. If a user selects a particular month the output would be count = 30 as  a measure called Closed and count = 16 as a measure value called Open.
    Need a MDX query to get output.
    Granularity  Count WeekKey MonthKey
    Weekly 16
    W1 M1
    Weekly 17
    W1 M1
    Weekly 18
    w1 M1
    Weekly 19
    W1 M1
    Weekly 20
    W1 M1
    Weekly 21
    W1 M1
    Weekly 22
    W1 M1
    Weekly 23
    w2 M1
    Weekly 24
    w2 M1
    Weekly 25
    w2 M1
    Weekly 26
    w2 M1
    Weekly 27
    w2 M1
    Weekly 28
    w2 M1
    Weekly 29
    w2 M1
    Weekly 30
    w2 M1
    Weekly 16
    w3 M1
    Weekly 17
    w3 M1
    Weekly 18
    w3 M1
    Weekly 19
    w3 M1
    Weekly 20
    w3 M1
    Weekly 21
    w3 M1
    Weekly 22
    w3 M1
    Weekly 23
    w4 M1
    Weekly 24
    w4 M1
    Weekly 25
    w4 M1
    Weekly 26
    w4 M1
    Weekly 27
    w4 M1
    Weekly 28
    w4 M1
    Weekly 29
    w4 M1
    Weekly 30
    w4 M1
    Thanks in advance

    Hi Venkatesh,
    According to your description, you need to count the members with conditions in a particular month, right?
    In MDX, we can achieve the requirement by using Count and Filter function, I have tested it on AdventureWorks cube, the sample query below is for you reference.
    with member [ConditionalCount]
    as
    count(filter([Date].[Calendar].[Month].&[2008]&[2].children,[Measures].[Internet Order Count]>50))
    select {[Measures].[Internet Order Count],[ConditionalCount]} on 0,
    [Date].[Calendar].[Date].members on 1
    from
    (select [Date].[Calendar].[Month].&[2008]&[2] on 0 from
    [Adventure Works]
    Reference
    http://msdn.microsoft.com/en-us/library/ms144823.aspx
    http://msdn.microsoft.com/en-us/library/ms146037.aspx
    If this is not what you want, please elaborate your requirement, such as the detail structure of your cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Report using Tabular Model and Measures based on Distinct Counts

    Hello,
    I am creating a report that should present something like this:
    YEAR-1 | MONTH-1 | MONTH-2 | MONTH-3... | YEAR | MONTH-1 | MONTH-2 | MONTH-3...
    My problem is that when designing the dataset to support this layout I drag the Year, Month and Distinct count Measure, but on the report when I want the value for the YEAR level I don't have it and I cannot sum the months value...
    What is the best aproach to solve this? Do I really have to go to advanced mode and customize my MDX or DAX? Can't basic users do something like this that seems so trivial and needed?
    Thank you
    Luis Simões

    Hi Luis,
    According to your description, you create a Reporting Services report using Analysis Service Tabular Model as the datasource, now what you want is sum the months value on year level, right?
    In your scenario, you can add the Month field to column group, add a parent group using Year Field and then add a Total on Month group. In this case, Reporting Services will sum the months value on Year level. I have tested it on my local environment, the
    screenshot below is for you reference.
    Reference:Lesson 6: Adding Grouping and Totals (Reporting Services)
    If this is not what you want, please describe your dataset structure, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • Intermittent AD Authentication failures in ISE 1.2

              Starting today I was getting intermittent authentication failures in ISE. It would say that the user was not found in the selected identity store. The account is there though. At one point I ran a authetication test from the external identi

  • Download and store file for later processing

    Hi Is this possible without using the FileConnection API: 1. Download an archive (XML-File with images) from a webserver and store it into RMS 2. Read the archive later and open it 3. Store the contents of the archive into RMS and delete the archive

  • INSTALL[for load] command without Security Domain AID

    Hello all, I have a question for the INSTALL[for load] command. The Security Domain AID is optional field, so I'm wondering if I didn't specify the AID, then which Security Domain performs the INSTALL[for load] command? Thanks, Julie.

  • Understanding 7-Mode 'license show' command output

    What does the "-"/hyphen/dash mean in the Expiration field? How does one determine the current expiration of installed licenses based on this output? Package           Type    Description           Expiration NFS               license NFS License    

  • Can I embed a webcam into site without streaming it to my server?

    Hello! I want to make a site were people would see themselves on their webcams. Is it possible without streaming the webcams to my server? I don't need it, I just want to show people to themselves on my web page Thanks, Billy