Performance of MDX Calculation

HI All,
What are the steps and ways to optimize the performance of the calculated Member created in the Cube.
I have the below Code for the calculated member:
CREATE MEMBER CURRENTCUBE.[Measures].[K3001 - Loaded Freight Rate (USD/FFE)]
 AS IIF([Measures].[Actual/Forecast FFE Loaded] = 0, NULL, 
([Accounts].[LMB Lvl4].&[LMB.4110],[Accounts].[Account Type].&[GR],[Measures].[Actual/Forecast USD])
+
([Accounts].[LMB Lvl5].&[LMB.5157],[Accounts].[Account Type].&[Rest of PnL],[Measures].[Actual/Forecast USD])
( [Measures].[Actual/Forecast FFE Loaded])), 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Revenue' ,  ASSOCIATED_MEASURE_GROUP = 'Key Figures';   
Here Accounts is a dimension.
Now this calculation shows me the correct value, but when I drill it with other Dimension say STRING, it take 40-50 sec to give the result.
Here I want to know whether there is some correction needed in my query or any other optimization technique is required.
Thanks
Sudipta Ghosh
Sudipta Ghosh Tata Consultancy Services

Hi Sudipta,
IIF is one of the most popular MDX functions. Yet, it can cause significant performance degradation, which is often blamed on other parts of the system. Many times it is simple to rewrite the MDX expression to get rid of IIF altogether, and other times it
is possible to slightly change the IIF to increase performance.
http://sqlblog.com/blogs/mosha/archive/2007/01/28/performance-of-iif-function-in-mdx.aspx
In addtional, i'd suggest you enable SQL Sever profiler to monitor the queries fired by the process, once you find some queries took a very long time to run, consider creating the smaller cube partition or optimzing the query by adding index or
partition to improve the query performance. Here are some links about performance tuning.
http://www.mssqltips.com/sqlservertip/2565/ssas--best-practices-and-performance-optimization--part-1-of-4/
http://sqlmag.com/t-sql/top-9-analysis-services-tips
http://channel9.msdn.com/Events/TechEd/NewZealand/2013/DBI414
Hope this helps.
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • MDX calculations using multiple hierarchies

    In previous versions of BPC (easpecially earlier versions of v5.1) it was not possible to have an MDX calculation (like a KPI in the form of A/B) when account A was part of Hierarchy1 and account B was part of hierarchy2.
    Do anyone of you have experience in newer version of 5 (like sp7 or 8) or v7 and know if this issue has been solved ?
    The thing is, in v4 these type of calculations worked.....
    But in the beginning of v5 it did not.
    Edwin van Geel

    Actually in this version you can specify the hierachy and it is recommended to that every time when you are writting an MDX formula.
    I think it should work but I never tried to be honest.
    Regards
    Sorin Radulescu

  • MDX calculated measure causing performance issue

    The calculated measure below against all product members is causing the excel pivot table to hang indefinitely. Any help on how to optimize the query for better performance?
    SCOPE ([MEASURES].[DIDaysInMonth]);
    THIS = CASE WHEN [Measures].[MonthDifference] < 0 THEN 0
    WHEN [MEASURES].[MonthDifference] >= 0 AND ProjectedEnd > 0 THEN [MEASURES].[DaysRemainingInMonth]
    WHEN [MEASURES].[MonthDifference] = 0 AND ProjectedEnd < 0 THEN
    [Measures].[Ordered Cases] / (([Measures].[Forecasted Sales]-[Measures].[Cases])/[measures].[DaysRemainingInMonth])
    WHEN [MEASURES].[MonthDifference] >= 0 AND ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) <= 0 THEN 0
    WHEN [MEASURES].[MonthDifference] > 0 AND ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) > 0 THEN
    ([Time Monthly].[Time Monthly].CurrentMember.PrevMember,[MEASURES].[ProjectedEnd]) /
    ([Forecasted Sales] / [daysInMonth]) END;
    END SCOPE;
    BI Developer

    Hi Abioye,
    According to your description, you create a calculated measure which against all products  in your AS cube, now the performance is poor when using this calculated measure in EXCEL Pivot table, right? In this case, here are some links which describe
    tips about performance tuning in SSAS, plesae see:
    http://technet.microsoft.com/en-us/library/cc966527.aspx
    http://sqlmag.com/t-sql/top-9-analysis-services-tips
    Hope this helps.
    Regards,
    Charlie Liao
    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

  • Is powerquery the place to perform advanced ETL Calculations?

    Ive been trying to calculate a rows cost based on a rules table using powerpivot but it has melted my mind. I really dont think powerpivot is the place to do this. The ETL Process is ideally wher this price should be calculated but as im only using excel
    and flatfiles, powerquery is my etl process.
    What im doing is:
    I have a flatfile of orders, like below.
    I have a manually created table of Stores & the same for Items.
    To calculate pricings i have a few rules to follow:
    -If itemID 1 is ordered, and on the same order item 2 or 3 is ordered i use the special price.
    -If item 3 is ordered from store 2 i use the special price.
    Otherwise standard price is used.
    Powerpivot is not the place to do this. Is this more suited to powerquery?
    orderid itemid storeid
    1 1 1
    1 2 1
    1 3 1
    1 1 1
    2 1 2
    3 4 3
    3 5 3
    4 1 4
    4 5 4
    4 4 4
    itemid price specialprice
    1 10 5
    2 10 5
    3 10 5
    4 10 5
    5 10 5
    6 10 5
    7 10 5

    In general, it is better if you can do ETL before importing data in Power Pivot.
    However, in this case the result of the Power Query ETL would be in the best case a SQL query that would push the complexity down to the data source engine, and in the worst case scenario it would request a big effort to Power Query engine working with an
    in-memory copy of data. This would result in a slow process time for the table.
    For this specific case, if you have a large amount of data (hundreds of thousands of rows or more), you might see better performance by creating a calculated columns in Power Pivot. I'm not saying this is always the best approach, but the rule you want to
    implement might be implemented in a DAX calculated column (in the Orders table) that should perform very quickly.
    =
    IF (
        OR (
            Orders[StoreID] = 3,
            AND (
                Orders[OrderID] = 1,
                AND (
                    CONTAINS (
                        Orders,
                        Orders[OrderID], Orders[OrderID],
                        Orders[ItemID], 2
                    CONTAINS (
                        Orders,
                        Orders[OrderID], Orders[OrderID],
                        Orders[ItemID], 3
        RELATED ( Items[SpecialPrice] ),
        RELATED ( Items[Price] )
    Marco Russo (Blog,
    Twitter,
    LinkedIn) - sqlbi.com:
    Articles, Videos,
    Tools, Consultancy,
    Training
    Format with DAX Formatter and design with
    DAX Patterns. Learn
    Power Pivot and SSAS Tabular.

  • Help in creating MDX Calculated Member using attributes from multiple Dimension

    Hi All,
    First of all my knowledge on MDX is basic. In one of our projects, there is a requirement to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member. Due to IP issues I cannot paste
    the actual queries but I will provide an SQL Query equivalent to what I am trying to achieve:
    Select P.Product, Case When ISNULL(FS.ArtistName,'') = '' Then P.ArtistName Else FS.ArtistName End Artist
     From
    dbo.FactMusicSales FS
    Join dbo.dimProduct P
    on P.DimProductKey =  FS.DimProductKey
    We are trying to replicate the logic for derving the "Artist" field using MDX script.
    We are running into issues while trying to build an MDX expression using the above logic. The main issue being that the new field/member "Artist" would not be calculated unless its elements are selected (FS.ArtistName, P.ArtistName). Besides this
    we are also unable to place this new member in a different folder other than a sub folder under the measures. Any pointers to solving this would be really helpful.
    Thanks in Advance,
    Venki

    Hi Venki,
    According to your description, you need to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member, right?
    In your scenario, you needn't to achieve this requirement by using MDX. You can use a named query on your data source view. A named query is a SQL expression represented as a table. In a named query, you can specify an SQL expression to select rows and columns
    returned from one or more tables in one or more data sources. So in you scenario, you can use your query on the DSV, and then use the modified table to create a dimension.
    http://msdn.microsoft.com/en-IN/library/ms175683.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • MDX Calculated Member With Multiple Conditions

    I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
    [Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
    This calculated member returns all the hours an employee worked that are not PTO.
    I need to select employee hours but with multiple conditions:
    - [DIM BILL STATUS][Bill Status] equals 0
    - [Employee Hours Time Category].[Time Category] equals "Client Facing"
    - [DIM PROJECT].[Client] isn't like "Olson"
    I know this is probably pretty easy, but I'm horrible with MDX!
    Thank you!!
    A. M. Robinson

    Thank you...
    Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
     FILTER ([DIM Project].[Client].[Client].Members , 
                 NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
    Heres the MDX I have so far that is working fine:
    ([Employee Hours Time Category].[Time Category].&[Client Facing],
       [DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
    Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
    A. M. Robinson

  • Performance - Objective Scoring Calculation

    Hi,
    I would like to calculate the objective by weight_of_objective * factor. The factor is defined as follows:
    Rating Level Factor
    ==============================================
    Partialy Meeting Expect High 0.7
    Partially Meeting Expect. Mid 0.6
    Partially Meeting Expect. Low 0.5
    Meeting Expectation High 1.0
    " Mid 0.9
    " Low 0.8
    like that... Where can I define the factor in application. How can I use it in formula?. I checked the seeded formula, but it is very simple without factor.
    Thanks in advance.

    Hi Sudipta,
    IIF is one of the most popular MDX functions. Yet, it can cause significant performance degradation, which is often blamed on other parts of the system. Many times it is simple to rewrite the MDX expression to get rid of IIF altogether, and other times it
    is possible to slightly change the IIF to increase performance.
    http://sqlblog.com/blogs/mosha/archive/2007/01/28/performance-of-iif-function-in-mdx.aspx
    In addtional, i'd suggest you enable SQL Sever profiler to monitor the queries fired by the process, once you find some queries took a very long time to run, consider creating the smaller cube partition or optimzing the query by adding index or
    partition to improve the query performance. Here are some links about performance tuning.
    http://www.mssqltips.com/sqlservertip/2565/ssas--best-practices-and-performance-optimization--part-1-of-4/
    http://sqlmag.com/t-sql/top-9-analysis-services-tips
    http://channel9.msdn.com/Events/TechEd/NewZealand/2013/DBI414
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • SUBSELECT vs WHERE performance issues MDX

    Hello,
    I've built SSRS report that gets CustomerID as parameter and runs MDX query with it.
    With WHERE clause it only takes 1 second to run, while if I pass it to SUBSELECT clause it takes 13 seconds!
    And I have to use SUBSELECT because I want to show the member's name in the results
    The syntax of the long query is:
        SELECT NON EMPTY { [Measures].[Revenue] } ON COLUMNS,
        NON EMPTY { ([CUBE DIM DATE].[Month CD].[Month CD].ALLMEMBERS *
        [CUBE DIM CUSTOMER].[Account MNG].[Account MNG].ALLMEMBERS *
        [CUBE DIM PRODUCT].[Product CD].[Product CD].ALLMEMBERS ) }
        DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, MEMBER_KEY ON ROWS FROM
        ( SELECT ({ [CUBE DIM CUSTOMER].[Customer No].&[111111]})   on 0 from   [CUBE_Prod] )
    So if instead of the last line I use:
        [CUBE_Prod]  WHERE [CUBE DIM CUSTOMER].[Customer No].&[111111]
    ...leaving all the rest the same then it only takes 1 second.
    Obviously, I am missing something...
    Please help...
    Thank you in advance
    Michael
    Michael

    http://stackoverflow.com/questions/21463364/mdx-sub-select-vs-where-performance-issues
    no sense in leaving points on the table ;-)
    BI Developer and lover of data (Blog |
    Twitter)

  • Performing a specific calculation in a pivot table with BI Publisher 10g

    I am using BI Publisher 10g and new on it and I need to integrate a specific calculation measure in a pivot table
    The logic uses two measures that already exist in the report (Demand & PAB) and the required calculation is represented by a new measure/row (Calculated). The pivot time is in weeks
    Week w0     w1     w2     w3     w4     w5 .....
    Demand     d(w0)     d(w1)     d(w2)     d(w3)     d(w4)     d(w5) .....
    PAB     p(w0)     p(w1)     p(w2)     p(w3)     p(w4)     p(w5) .....
    Calculated     c(w0)     c(w1)     ....     ....     ....     c(w5) .....
    If p(w0) < d(w1) --> then c(w0) = p(w0) / d(w1)
    If not
    If p(w0) < d(w1) + d(w2) --> then c(w0) = p(w0) / ( d(w1) + d(w2) ) * 2
    If not
    If p(w0) < d(w1) + d(w2) + d(w3) --> then c(w0) = p(w0) / ( (dw1) + d(w2) + d(w3 ) ) * 3
    If not
    etc .... Same logics apply for c(w1) and so on
    Is such calculation logic achievable in Bi Publisher ? If yes, how would you do it ?
    Thanks for your time and support on this
    Regards, Samir
    Edited by: skaroui on 02-Mar-2012 05:50
    Edited by: skaroui on 02-Mar-2012 06:02
    Edited by: skaroui on 02-Mar-2012 06:12

    Can you use the logic that you specified in the data model (query) to generate the required data and then use it in the pivot table? That would be the easiest way to do it. Tweaking the code to include the conditional logic/calculated measures is not going to be straightforward..
    Thanks,
    Bipuser

  • How do you get a fillable pdf to perform a new calculation if data is changed on form

    I have created a form to calculate payment terms. The forms work great however if you make a mistake inputting or change data after calculation has been preformed i need the new data to be calculated. Is there a way to do this?
    thanks

    Hi Gilad,
    Thank you for the information. Unfortunately the form that I built does not provide the correct number if any data is changed.
    Is there something that I am missing?
    I am using the form to complete and installment loan contract
    Thanks again

  • How to Zero Debt After Account Closure Date in MDX Calculated Measure

    Thanks in advance to anyone who can help me with the below problem.
    I’m building a Finance cube, it holds all customers we have billed and any cash received against their debt. I have a few calculated measures that work out Total Debt, Total Cash. From these I have a calculated measure called Total Debt Outstanding which
    is (Total Debt - Total Cash)
    My problem, when an account is closed the debt is not always zero. We don’t always get all the cash to cover the debt so just write off the outstanding debt. I have a requirement to zero out the debt after closure date has passed. 
    If I look at the calculated measure [Total Debt Outstanding] today for all accounts it will include debt figures from closed accounts, I need the calculated measure
    [Total Debt Outstanding] to ignore this and not to inflate my current debt figure.
    Example
    Account 12345, Debt £3142 added on 15/03/2013, Cash £1,687
    received on 12/12/2013, Total Debt Outstanding £1107. The Account closed on 15/12/2013 with a balance of £1107, after the closure date I need the total Debtor outstanding figure to be £0 if you browse the cube with my date dimension. 
    My date dimension Hierarchies is Year-Quarter-Month-Day
    I have tried using the Scope function to Zero the Total Debt Outstanding figure after closure date but can’t get it to work. 
    My scope calculation is below:
    Scope([Measures].[Total Debt Outstanding]);
    This = IIF([Date].[Year-Quarter-Month-Day].Currentmember > [ClaimData].[Closed].[Closed].Currentmember,0,[Measures].[Total Debt Outstanding]);
    End Scope;
    My Account Opening and Closing dates are in my ClaimData fact table, with Opening Date linked to the date dimension. I can’t link Closing date as we don’t always have a closing date until the account closes, so SSAS errors.
    Many Thanks

    Hi,
    Try compare key value of members. For example,
    [Date].[Year-Quarter-Month-Day].Currentmember.Properties("key") > [ClaimData].[Closed].[Closed].Currentmember.Properties.("key")
    And think about UnknownMember in Date dimension. In this case you can link Closing date
    Best regards,
    Aleksandr Severin

  • Performance equipment rate calculation

    Dear All,
    Could you explain to me how to handle performance equipment rate in SAP B1 ? we have created an equipment card but we still unable to calculate it. TIA
    Rgd
    Mark

    I guess and I am sure you have had developed an addon. It is probably a UI addon or DI addon. Let me know about it.
    Basic rating of equipment is efficiency. you can create some UDFs in the production order. The UDF is a routing/operation sequence and linked to a table. Creating more than one table can make you easy to store machine per each product. Of course the table is not included in the general ledger journal transaction. you do this manually in the journal entry. The table consists of machine type, capacity and efficiency.
    let me know if you need more detail.
    Rgds,

  • MDX and performance

    I know dimension formulas impact performance drammatically but I don't really understan how i works.
    I have formulas in two different hierarchies, but it seems as if the formulas in both hierarchies is calculated every time I run a report whether the report will only show data from one hierarchy.  Must the system calculate all formulas everytime?

    Our current hardware setup is like this
    ·         Single server
    ·         Processors: 2 x Intel(R) Xeon(R) CPU E5320  1.86GHz
    ·         Harddrives: One physical drive SAS 15000 rpm
    o    C: 32 gb SAS Os
    o    D: 35 gb SAS Program
    o   E: 272 gb SAS Data.
    ·         4 GB Ram
    ·         System: Microsoft Windows Server Standard Edition 2003, SP2
    ·         SQL Server 2000
    And this is our dimension formulas:
    //This is where Stampen-specific MDX calculations begins
    //Hierarchy 1
    *Function Hir1(%Arg%)
         iif(Konto.H2.CurrentMember is .[H2].[All Konto.H2] and Konto.H3.CurrentMember is .[H3].[All Konto.H3] and Konto.H4.CurrentMember is .[H4].[All Konto.H4],%Arg%,Null)
    *endfunction
    *Function Hir2(%Arg%)
         iif(Konto.H1.CurrentMember is .[H1].[All Konto.H1] and Konto.H3.CurrentMember is .[H3].[All Konto.H3] and Konto.H4.CurrentMember is .[H4].[All Konto.H4],%Arg%,Null)
    *endfunction
    *Function Hir3(%Arg%)
         iif(Konto.H1.CurrentMember is .[H1].[All Konto.H1] and Konto.H2.CurrentMember is .[H2].[All Konto.H2] and Konto.H4.CurrentMember is .[H4].[All Konto.H4],%Arg%,Null)
    *endfunction
    *Function Hir4(%Arg%)
         iif(Konto.H1.CurrentMember is .[H1].[All Konto.H1] and Konto.H2.CurrentMember is .[H2].[All Konto.H2] and Konto.H3.CurrentMember is .[H3].[All Konto.H3],%Arg%,Null)
    *endfunction
    *Function ASTxxx_H2(%p1%,%p2%,%p3%)
         iif( .currentmember.name = "YTD", iif( (.[H2].[%p1%],[Measures].[YTD]) = 0, Null,  ( (.[H2].[%p2%],[Measures].[YTD]) / (.[H2].[%p1%],[Measures].[YTD]) ) * %p3% ), iif( .currentmember.name = "M12", iif( (.[H2].[%p1%],[Measures].[M12]) = 0, Null,  ( (.[H2].[%p2%],[Measures].[M12]) / (.[H2].[%p1%],[Measures].[M12]) ) * %p3% ), iif( .currentmember.name = "PERIODIC", iif( (.[H2].[%p1%],[Measures].[PERIODIC]) = 0, Null, ( (.[H2].[%p2%],[Measures].[PERIODIC]) / (.[H2].[%p1%],[Measures].[PERIODIC]) ) * %p3% ), Null))), solve_order=12
    *endfunction
    *Function TotalaIntakter_H2
         (HIR2(.[H2].[AS1000].[H2].[AS1100].[H2].[AS1200].[H2].[AS1300].[H2].[AS1400]))
    *endfunction
    *Function TB1_H2
         (TotalaIntakter_H2+HIR2(.[H2].[AS1500]))     
    *endfunction
    *Function TB2_H2
         (TB1_H2+HIR2(.[H2].[AS1700]))     
    *endfunction
    *Function Totalarorelsekostnader_H2
         (HIR2(.[H2].[AS1500].[H2].[AS1700].[H2].[AS1800].[H2].[AS1810].[H2].[AS1900].[H2].[AS1910].[H2].[AS1930].[H2].[AS1940].[H2].[AS1950].[H2].[AS2000].[H2].[AS2100]))
    *endfunction
    *Function EBITA_H2
         (TotalaIntakter_H2Totalarorelsekostnader_H2HIR2(.[H2].[AS2155]))     
    *endfunction
    *Function EBITDA_H2
         (TotalaIntakter_H2Totalarorelsekostnader_H2HIR2(.[H2].[AS2155]-[KONTO].[H2].[AS2100]))
    *endfunction
    *Function EBIT_H2
         (TotalaIntakter_H2Totalarorelsekostnader_H2(HIR2(.[H2].[AS2155]+.[H2].[AS2185])))
    *endfunction
    *Function Finansnetto_H2
         (HIR2(.[H2].[AS2200]+.[H2].[AS2300]))
    *endfunction
    *Function EBT_H2
         (HIR2(.[H2].[AS1000].[H2].[AS1100].[H2].[AS1200].[H2].[AS1300].[H2].[AS1400].[H2].[AS1500].[H2].[AS1700].[H2].[AS1800].[H2].[AS1810].[H2].[AS1900].[H2].[AS1910].[H2].[AS1930].[H2].[AS1940].[H2].[AS1950].[H2].[AS2000].[H2].[AS2100].[H2].[AS2155].[H2].[AS2185].[H2].[AS2200]+.[H2].[AS2300]))     
    *endfunction
    *Function Netresult_H2
         (HIR2(.[H2].[AS1000].[H2].[AS1100].[H2].[AS1200].[H2].[AS1300].[H2].[AS1400].[H2].[AS1500].[H2].[AS1700].[H2].[AS1800].[H2].[AS1810].[H2].[AS1900].[H2].[AS1910].[H2].[AS1930].[H2].[AS1940].[H2].[AS1950].[H2].[AS2000].[H2].[AS2100].[H2].[AS2155].[H2].[AS2185].[H2].[AS2200].[H2].[AS2300].[H2].[AS2400]))
    *endfunction
    *Function Foradlingsvarde_H2
         (HIR2(.[H2].[AS1000].[H2].[AS1100].[H2].[AS1200].[H2].[AS1300].[H2].[AS1400].[H2].[AS1500].[H2].[AS1700].[H2].[AS1810].[H2].[AS1900].[H2].[AS1910].[H2].[AS1930].[H2].[AS1940].[H2].[AS1950]+.[H2].[AS2000]))
    *endfunction
    *Function Foradlingsvarde_H2_PRO
         (HirPro2(.[H2].[AS1000].[H2].[AS1100].[H2].[AS1200].[H2].[AS1300].[H2].[AS1400].[H2].[AS1500].[H2].[AS1700].[H2].[AS1810].[H2].[AS1900].[H2].[AS1910].[H2].[AS1930].[H2].[AS1940].[H2].[AS1950]+.[H2].[AS2000]))
    *endfunction
    *Function DSO_H2
              iif(((.[H2].[AST610],[Part].[EXT_PART])(.[H2].[AST610],[Part].[PA_None]))=0,Null,((((.[H2].[AS1450],[TimeDim].lag(0),[Part].[EXT_PART],[Measures].[PERIODIC])(.[H2].[AS1450],[TimeDim].lag(0),[Part].[PA_None],[Measures].[PERIODIC])(.[H2].[AS1450],[TimeDim].lag(1),[Part].[EXT_PART],[Measures].[PERIODIC])(.[H2].[AS1450],[TimeDim].lag(1),[Part].[PA_None],[Measures].[PERIODIC])(.[H2].[AS1450],[TimeDim].lag(2),[Part].[EXT_PART],[Measures].[PERIODIC])(.[H2].[AS1450],[TimeDim].lag(2),[Part].[PA_None],[Measures].[PERIODIC]))/3)/((.[H2].[AST610],[Part].[EXT_PART])+(.[H2].[AST610],[Part].[PA_None]))*30))          
    *endfunction
    //Hierarchy 2
    *Function ASTxxxV_H4(%p1%,%p2%,%p3%)
         iif( .currentmember.name = "YTD", iif( (.[H4].[%p1%],[Measures].[YTD]) = 0, Null,  ( (.[H4].[%p2%],[Measures].[YTD]) / (.[H4].[%p1%],[Measures].[YTD]) ) * %p3% ), iif( .currentmember.name = "M12", iif( (.[H4].[%p1%],[Measures].[M12]) = 0, Null,  ( (.[H4].[%p2%],[Measures].[M12]) / (.[H4].[%p1%],[Measures].[M12]) ) * %p3% ), iif( .currentmember.name = "PERIODIC", iif( (.[H4].[%p1%],[Measures].[PERIODIC]) = 0, Null, ( (.[H4].[%p2%],[Measures].[PERIODIC]) / (.[H4].[%p1%],[Measures].[PERIODIC]) ) * %p3% ), Null))), solve_order=12
    *endfunction
    *Function ASTxxxV2_H4(%p1%,%p2%,%p3%,%p4%)
         iif( .currentmember.name = "YTD", iif( (.[H4].[%p1%],[Measures].[YTD]) = 0, Null,  ( ((.[H4].[%p2%],[Measures].[YTD])(.[H4].[%p4%],[Measures].[YTD])) / (.[H4].[%p1%],[Measures].[YTD]) ) * %p3% ), iif( .currentmember.name = "M12", iif( (.[H4].[%p1%],[Measures].[M12]) = 0, Null,  ( ((.[H4].[%p2%],[Measures].[M12])(.[H4].[%p4%],[Measures].[M12])) / (.[H4].[%p1%],[Measures].[M12]) ) * %p3% ), iif( .currentmember.name = "PERIODIC", iif( (.[H4].[%p1%],[Measures].[PERIODIC]) = 0, Null, ( ((.[H4].[%p2%],[Measures].[PERIODIC])+(.[H4].[%p4%],[Measures].[PERIODIC])) / (.[H4].[%p1%],[Measures].[PERIODIC]) ) * %p3% ), Null))), solve_order=12
    *endfunction
    *Function ASTB1_H4
         (HIR4(.[H4].[AS3V]+.[H4].[AS4V])) 
    *endfunction
    *Function ASTB1P_H4
         iif(HIR4(.[H4].[AS3V])=0,Null,ASTB1_H4/HIR4(.[H4].[AS3V])),solve_order=12          
    *endfunction
    *Function ASEBITA_H4
         (ASTB1_H4(HIR4(.[H4].[ASFK].[H4].[ASINTBOLV])))
    *endfunction
    *Function ASEBITAP_H4
         iif(HIR4(.[H4].[AS3V])=0,Null,ASEBITA_H4/HIR4(.[H4].[AS3V])),solve_order=12          
    *endfunction
    *Function ASEBT_H4
         (ASEBITA_H4+(HIR4(.[H4].[AS8V])))  
    *endfunction
    *Function ASEBTP_H4
         iif(HIR4(.[H4].[AS3V])=0,Null,ASEBT_H4/HIR4(.[H4].[AS3V])),solve_order=12          
    *endfunction
    *Function AST902v_H4
         iif(HIR4(.[H4].[AS34V])=0,Null,HIR4(.[H4].[AST001V])/HIR4(.[H4].[AS34V])),solve_order=12          
    *endfunction
    *Function AST907v_H4
         iif((HIR4(.[H4].[AS101v].[H4].[AS35V]))=0,Null,ASEBITA_H4/(HIR4(.[H4].[AS101v])(.[H4].[AS35V]))),solve_order=12          
    *endfunction
    Edited by: Daniel Svensson on Aug 12, 2008 1:29 PM

  • Mdx Query performance problem

    Hi
    Is there any way to control the performance of Mdx expressions that use the Filter function? The following Mdx statement is an example of a query we are generating to return filtered characteristic values for users to make selections for variables.
    Note: It is intentional that the column axis is not populated as we are interested only in the returned characteristic values.
    SELECT {} N COLUMNS,
    Order(
         Filter(
              {[ZPLANTYPE].[All].Children},
              (([ZPLANTYPE].CurrentMember.Name >= 'a' AND [ZPLANTYPE].CurrentMember.Name < 'b') OR
              ([ZPLANTYPE].CurrentMember.Name >= 'A' AND [ZPLANTYPE].CurrentMember.Name < 'B'))
         [ZPLANTYPE].CurrentMember.Name, BASC
    ) ON ROWS FROM [$IC_FLT]
    In a real example with 162,000 charateristics this query is taking up to 5 minutes to run - clearly unacceptable as part of a user interface. It appears that behind the scenes a sequential read of the underlying dimesnion table is being carried out.
    It is difficult to create a more sophisticated query due to the lack of string handling logic in the raw Mdx language.

    Hi,
    I have been through the queries, and understand that the "_MSCM1" is being aggregated across Product and Paid Amount from the query extract below:
    member [Accounts].[_MSCM1] as 'AGGREGATE({[_Product2]}, [Accounts].[Paid Amount])'
    If I am getting it right, there is an aggregation rule missing for [Paid Amount] (I think that's the reason, the query is to aggregate _MSCM1 by "Paid Amount" ie just like any other dimension).
    Could you please check this once and this is why I think BI is generating two queries? I am sorry, if I got this wrong.
    Hope this helps.
    Thank you,
    Dhar

Maybe you are looking for

  • Mac Pro shut down on its own, then on boot up it beeped steadily for 2 min?

    I put my 2009 Mac Pro to sleep then the next day I find it completely shut down! I boot it up and then I hear a steady beep (every second) for about 2 minutes. After 2 minutes the beeping went away. Any idea what caused Mac Pro to shut down on its ow

  • Bom And Routing Import interface errors Help needed

    Hi All, I am using bom and Routing Interface to load the Bom and Routing Header.papulating the BOM_INVENTORY_COMPS_INTERFACE,BOM_OP_SEQUENCES_INTERFACE,and BOM_OP_RESOURCES_INTERFACE tables BOM header and Components are created sucessfully but routin

  • Apex on Sourceforge!

    Just ran into Scott's recently blog entry about Apex on Sourceforge! http://spendolini.blogspot.com/2006/04/apex-open-source-applications.html http://sourceforge.net/projects/oracle-apex/ http://apex.oracle.com/pls/otn/f?p=45326:107 Looks like this i

  • Unbelievable ABAP oddity - SapScript related

    Sappers, I have officially come across the oddest ABAP problem that I have seen in 8 years.  I've spent 8+ hours trying every possible code variation to get around it but nothing works. Here's the story in summary. We have an invoice with shipping fi

  • RSRV doesnt show contents of one particular cube

    Hello Gurus, I have loaded data into a cube, around 500k. I can see the data in the manage cube option. but RSRV shows that fact table has 0 records and dim tables have 1 records each!!!!!!!! Why is this. i am confused. Plese help. Thank you, Kris.