VARIABLE IN MDX FORMULA

Hello,
I have a package which only rund a logic,
this package enables to select an entity on which the logic will run
so in my package assign parameters component , i have my prompt
PROMPT(SELECTINPUT,%MY_ENTITY%,"Enter the entity",,"%ENTITY_DIM%")
and then
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,APPSET,%APPSET%)
TASK(Execute formulas,APP,%APP%)
TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
TASK(Execute formulas,FORMULASCRIPT,"*FUNCTION MYENTIY=%MY_ENTITY%")
TASK(EXECUTE FORMULAS,LOGICFILE,TEST.LGF)
in my logic, i want to use the entity put in the package in a mdx formula,
*MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=MYENTITY),99,LEAVES)")
the variable MYENTITY isn't working, so my variable %Ent_R% is corrupted too
how can i change the syntax in order to include MYENTITY parameter please
i have tried so many things, i'm stuck
thanks in advance
regards
CL

Hello,
First of all, most sincere thanks for replying, i'm stuck and blocked and beginner in logic and have no collegue around me to advice me or help me, and i've tried so many things that i end up mixing them
the problem is that the follwing syntax
*MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=%ENTITY_SET%),99,LEAVES)")
isn't validated when i do a "validate and process logic" it rejects me by giving this message
error in step 1 of QueryCubeAndDebug:-2147217900 Formula error - syntax error - token is not valid: "{DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")=^%^ENTITY_SET%),99,LEAVES)}"
when i put the variable name around commas like ' ' or " "
this way  for instance
*MEMBERSET(%Ent_R%,"DESCENDANTS(FILTER([ENTITE].MEMBERS,[ENTITE].CURRENTMEMBER.PROPERTIES("ENTITE_REF")="%ENTITY_SET%"),99,LEAVES)")
the logic validates, the package runs but no data are written
in the debuglogicfile, it seems that it doens't recongnize the fact that it is a variable, and put it as string
i really don't know how to put it

Similar Messages

  • Problem in taking correct Substitution variable in MDX Formula

    Hi,
    We have MDX Formula which takes Substitution Variable as input . Previously we used Hyperion Essbase 9.3.1.3 version and working fine currently we upgraded to 11.1.1.3 version After Upgrade this formula is not taking correct updated value. Its taking previously updated value . To Take the Correct value we are bouncing the Essbase Services then only new Formula is picking the latest Updated value. This is happening only for one formula and rest everything is working fine. Can you please tell us is there any bug or where is the problem is ?
    Thanks,
    Naresh.

    The Database Administrator's Guide and the Essbase Technical Reference are available through the documentation portal:
    http://download.oracle.com/docs/cd/E17236_01/nav/portal_3.htm
    Both the Database Administrator's Guide and the Technical Reference are searchable on an exact phrase, to find the source of the extract John provided.
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/dotcreat.html#dotcreat1053369
    See section "Setting Substition Variables".

  • Inconsistent results with MDX formula

    Hi. I'm converting a BSO cube to ASO, and it has dynamically calculated formulas that I'm converting to MDX. I have a formula that is supposed to accumulate an account (Order Intake) through the months and years until it gets to the current month of the current year (set by substitution variables) and then just carries that balance forward until the end.
    This is the formula I wrote in MDX.
    IIF( Count( Intersect( {MemberRange([Years].[FY95], [&Auto_CurYr].Lag(1))}, {Years.CurrentMember} ) ) = 1,
    IIF(CurrentMember ([Period]) = [Jan],
    [Order Intake] + ([Contract Value],[Adj],[Years].CurrentMember.PrevMember),     
    [Order Intake] + ([Contract Value],[Period].CurrentMember.PrevMember)
    IIF( CurrentMember ([Years]) = [&Auto_CurYr],
    IIF( CurrentMember ([Period]) = [Jan],
    [Order Intake] + ([Contract Value],[Adj],[Years].CurrentMember.PrevMember),
    IIF( Count( Intersect( {MemberRange([Period].[Feb], [&Auto_CurMoNext_01].Lag(1))}, {Period.CurrentMember} ) ) = 1,
    [Order Intake] + ([Contract Value],[Period].CurrentMember.PrevMember),
    ([Contract Value],[Period].CurrentMember.PrevMember)
    ([Contract Value],[Adj],[Years].CurrentMember.PrevMember) /*This is the statement that evaluates for months and years after the current month and year*/
    The inconsistent results are as follows:
    I have a spreadsheet that has the years and months across the top in columns. The substitution variables are set to FY09 for the year and Oct for the month. The formula works fine until it gets to Jan of FY10, at which point it produces a number out of thin air, and carries that incorrect number through to the end.
    When I put the years and months into my rows, however, and then drill down on the months, I get different results. Not only different, but different results at different times, too. When I first drilled, all results were correct. Now when I drill, it produces a random number in October of FY09 (not entirely random, but actually double what it's supposed to be), then #missing in Nov of FY09, then the correct number thereafter. Same exact data intersection on both spreadsheets, different results. I've retrieved over and over again, and the only time it might change is if I re-drill. I've used both Essbase Add-in and Smart View with consistently inconsistent results.
    Has anyone ever encountered this sort of behavior with an MDX formula?

    Well, I finally got a formula that works. I did end up using a combination of CASE and IIF, but I never did figure out how to deal with summing up ranges of data correctly, accounting for changing substitution variables, so I had to do a lot of hard coding by month. For instance, I couldn't ask it to sum([Order Intake],[Jan],[&Auto_CurYr]:([Order Intake],[&Auto_CurMo],[&Auto_CurYr]). Although it validated fine, when I tried to retrieve it said members were not of the same generation, presumably because my substitution variable could potentially be a non - level 0 month (it worked if I hard coded the end month). Also, I really don't like the MDX version of @LSIBLINGS and @RSIBLINGS.
    But this works.
    CASE
    When Count( Intersect( {MemberRange([Years].[FY95], [&Auto_CurYr].Lag(1))}, {Years.CurrentMember} ) ) = 1
    THEN IIF(CurrentMember ([Period]) = [Jan],
    [Order Intake] + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Feb],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Feb]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Mar],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Mar]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Apr],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Apr]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [May],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[May]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Jun],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Jun]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Jul],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Jul]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Aug],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Aug]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Sep],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Sep]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Oct],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Oct]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Nov],
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Nov]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Dec]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember))
    When CurrentMember ([Years]) IS [&Auto_CurYr]
    THEN IIF(CurrentMember ([Period]) = [Jan],
    [Order Intake] + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Feb] AND CONTAINS([Feb], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Feb]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Mar] AND CONTAINS([Mar], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Mar]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Apr] AND CONTAINS([Apr], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Apr]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [May] AND CONTAINS([May], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[May]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Jun] AND CONTAINS([Jun], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Jun]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Jul] AND CONTAINS([Jul], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Jul]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Aug] AND CONTAINS([Aug], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Aug]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Sep] AND CONTAINS([Sep], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Sep]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Oct] AND CONTAINS([Oct], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Oct]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    IIF(CurrentMember ([Period]) = [Nov] AND CONTAINS([Nov], {MEMBERRANGE([&Auto_CurMoNext_01].FirstSibling, [&Auto_CurMoNext_01].Lag(1))}),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[Nov]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember)),
    Sum(CrossJoin({[Order Intake]}, {[Jan]:[&Auto_CurMo]})) + sum(([Order Intake],[YearTotal],[FY95]):([Order Intake],[YearTotal],[Years].CurrentMember.PrevMember))
    WHEN CONTAINS([Years].CurrentMember, {MemberRange([&Auto_CurYr].Lead(1), [Years].[FY15])})
    THEN ([Contract Value],[Adj],[Years].&Auto_CurYr)
    END
    Thanks for looking at it, Gary, I appreciate it.
    Sabrina
    Edited by: SabrinaD on Nov 18, 2009 2:29 PM
    Edited by: SabrinaD on Nov 18, 2009 2:31 PM
    Edited by: SabrinaD on Nov 18, 2009 2:34 PM
    Edited by: SabrinaD on Nov 18, 2009 2:35 PM

  • How to use user variable in Member Formula

    Hi All
    I have to write a member formula for %linearity quarter for a weekly application.This member will be used in reports and we do not want to do this calculation in reports, hence need to write member formula. The formula is
    Week1 of Q1 forecast / Q1 Total Forecast , Week2 of Q1 Forecast/ Q1 Forecast.............,Week15 of Q2 forecast/ Q2Total Forecast.......and so on.
    According to me it should work in the below mentioned manner , but need help in improvising the formula.
    If(@ismbr("Weeks1") or @ismbr("Weeks2") or @ismbr("Weeks3") or @ismbr("Weeks4") or @ismbr("Weeks5") or @ismbr("Weeks6") or @ismbr("Weeks7") or @ismbr("Weeks8") or @ismbr("Weeks9") or @ismbr("Weeks10") or @ismbr("Weeks11") or @ismbr("Weeks12") or @ismbr("Weeks13") or @ismbr("Weeks14") )
    "Current_Forecast"/"Q1"->"Current_Forecast";......
    If anybody can help in suggesting how can i use user variable in this formula to achieve the required result.
    Thanks

    Hi
    Thanks for the suggestion and it would be a better idea to use ISIDESC as compared to ISMBR.
    I also wanted to ask if in the below mentioned formula if the result of first line is true than will the second line pick the current_forecast value of the respective member of Q1 and divide it by the current_forecast value of Q1.
    IF(@ISIDESC("Q1"))
    "Current_Forecast"/"Q1"->"Current_Forecast";
    Also i need to know how can i write a member formula for week YOY% using user variables.The general formula is
    Week 1 of FY13 - Week 1 of FY12/Weeks 1 of FY12
    Week 2 of FY13 - Week 2 of FY12/Weeks 2 of FY13 and so on till week 53.
    Thanks

  • How to include a variable in a formula calc

    Hi,
    I need to do some calc formula to help my report but I encounter a problem.
    I use this formula to erase some data from my channel but the formula don't reconize my variables.
    R4 = CMax(Ch("[1]/TRAVEL_DISTANCE"))
    Call DataBlDel("[1]/TRAVEL_DISTANCE_SMT",ChnFind("Ch(""[1]/TRAVEL_DISTANCE"")>R4",1),2000,1)'... ChnNoStr,ChnRow,ValNo,ValDelOnly , but the formula for the ChnRow don't see the variable R4, and if I put " before R4( to make R4 green) I receive an error : Expected ')'.
    Please tell me how I can use a variable in a formula , so the formula can see it.
    Thanks
    Solved!
    Go to Solution.

    Hi marse,
    The smiley face inserted by the text editor got in our way.  If you replace the smiley face in my reply with a "close-parenthesis" character, then the code will run correctly.  I have to admit, though, that there does appear to be a logic error, despite the fact that the code ran correctly on the data set I tried it with.  But finding the row of the peak is something you can do less ambiguously and more easily with the PNo() function:
    R4 = CMax(Ch("[1]/TRAVEL_DISTANCE")) Row = PNo("[1]/TRAVEL_DISTANCE", R4)Call DataBlDel("[1]/TRAVEL_DISTANCE_SMT", Row, 2000, 1) 
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to use a characteristic value variable in a formula?

    Hi all,
    I have created a characteristic value variable (manual input) for 0CALDAY in a query to get the Start & End date. There is requirement in the report to display a KF showing the duration between Start & End Date.
    I have tried to create a Formula Variable with Replacement Path, Ref Char 0CALDAY. In the Replacement Rule, there is an option to Replace Variable With variable. However, I wasn't able to locate the variable I have created for user input.
    Any idea how to achieve this?
    Many thanks,
    Yoong-En

    hi,
    if you have the start and end dates as user entry then follow this
    1) create a formula variable with reference char as start date of the type customer exit
    2) create another formula with end date as reference char of type customer exit
    3) in the cmod write the code your logic should be in such a way the the value at the user entry should be passed on to this formula variable the same for end date code
    4) create a formula with ( start date formula variable - end date formula variable)
    you can use this code
    WHEN 'ZV_YRFKDAT'.(formula  variable name)
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZV_KEYDAT1'.(user entry variable name)
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW. "low value, e.g.YYYY (2006) part of key date (20060625)
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
    repeat teh same for end date
    hope this helps
    Thanks
    krishna.y
        ENDIF.

  • Error in execution of mdx formula in ASO::  Recursion limit[31] reached

    Hi,
    We are implementing the ASO cube using the Hyperion Essbase version 9.3.1.
    Few dimension members need to have formulas which we are writing using the mdx.
    Mdx formulas are successfully verified but at retrieval time, it is throwing the following error-
    Error executing formula for[604120](line 0) : Recursion limit[31] reached.
    In outline, mdx formulas has been assigned to member name '604120' and '604520' in 'Report Line (P/L)' dimension as per business requirement.
    Formula on member '604520' = [604120]-[604320] +[604220]
    And
    Formula on member '604120' =
    IIF(
    IS([Time].CurrentMember, [Jan]),
    ([Report Line (P/L)].[604520], [Dec], [Year].CurrentMember.PrevMember),
    ([Report Line (P/L)].[604520],[Time].CurrentMember.PrevMember, [Year].CurrentMember)
    On further investigation, it seems there is dependencies in formulas. And it need to be rewrite.
    I am new in mdx queries. Please help me to write. Quick respone will be appreciated.
    Thanks & Regards,
    Mohit

    http://essbase.ru/ wrote:
    Check Essbase CFG
    - it's Error from settings limitisWhich setting are you referring to for ASO.
    Cheers
    John
    http://john-godowin.blogspot.com/

  • Essbase 11.1.2.1 - Converting BSO Member Formula to ASO MDX Formula

    Hi all,
    I'm quite new at Essbase and I'm currently using Essbase 11.1.2.1. I have 2 cubes: one is a BSO cube and the other is an ASO cube.
    In the BSO cube, I have an account that has member formula:
    IF(@ISATTRIBUTE("US"))
    ("Sales"->"Budget"->"USD")-("Sales"->"Actual"->"USD");
    ELSEIF(@ISATTRIBUTE("EU"))
    ("Sales"->"Budget"->"EUR")-("Sales"->"Actual"->"EUR");
    ELSEIF(@ISATTRIBUTE("UK"))
    ("Sales"->"Budget"->"GBP")-("Sales"->"Actual"->"GBP");
    ENDIF
    Notes:
    - Sales is an account
    - US, EU, and UK are members of Country attribute dimension
    - Budget and Actual are members of Scenario dimension
    - USD, EUR, and GBP are members of Currency dimension
    I understand that the member formula for BSO and ASO are different. Can anyone please advise me on what the formula should be in ASO cube as MDX formula?
    Thank you very much!

    CASE [Currency].CurrentMember.[Country]
         WHEN "US" THEN ([Sales], [Budget], [USD]) - ([Sales], [Actual], [USD])
         WHEN "EU" THEN ([Sales], [Budget], [EUR]) - ([Sales], [Actual], [EUR])
         WHEN "UK" THEN ([Sales], [Budget], [GBP]) - ([Sales], [Actual], [GBP])
         ELSE 0
    END
    *Note that I am assuming Country is an attribute of Currency based on the information provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need some help with MDX formula

    Hello, I am not finding any good documentation on MDX formulas, there is a specific one that I need some help with....could someone please elaborate what exactly does this formula mean? thanks.
    (MEASURES.[SIGNEDDATA],
    CLOSINGPERIOD([%TIMEDIM%].
    [%TIMEBASELEVEL%]))

    If new MEASURE gets added to Measure's table , in BPC Client , etools->client Options-> Refresh Dimensions should get the new measure into the CurrentView .IF not try  etools->client Options-> Clear Local application information .
    Formula 2 : 
    (MEASURES.SIGNEDDATA,
    CLOSINGPERIOD(%TIMEDIM%.
    %TIMEBASELEVEL%))
    This formula is used to retrieve AST & LEQ account values.
    If current time member is at monthlevel ,ie  ClosingPeriod of  2011.FEB is  the current member it self ,and would retrieve 2011.FEB value.
    If Current time member is at quarter level then ClosingPeriod of 2011.Q1 is 2011.Mar  ,and would retrieve 2011.MAR value.
    If Current time member is at year level then ClosingPeriod of 2011.TOTAL is 2011.DEC  ,and would retrieve 2011.DEC value.
    Formula 1 :
    MEASURES.SIGNEDDATA
    Irrespective of the level of the Time , MEASURES.SIGNEDDATA would retrieve current Time member value.This formula is used to retrieve INC & EXP account values
    if current time member is at month level,2011.FEB , 2011.FEB value is retrieved.
    if current time member is at quarter level,2011.Q1 , 2011.Q1(JANFEBMAR)  value is retrieved.
    if current time  member is at year level,2011.TOTAL , 2011.TOTAL(JAN,FEB,....,DEC)  value is retrieved.
    Hope this helps.

  • MDX Formulas

    Are MDX formulas used only in ASO cubes or we can use it BSO as well.
    I looked into the Essbase DBAG, But could not find the right information. If anybody know about this, please clarify.
    Thanks for the Help in advance..........

    Hi ,
    One can use MDX script editor to retrive data from BSO cubes .
    But, As far as the member formulas of the ASO outline is concerned , we got to use the MDX only.
    I have tried this on the 7X version.
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • Help with MDX formula

    Hi All,
    I have MDX formula which is validating but not producing result, can you guide me in right direction to fix the issue.
    What i am trying to accomplish is?
         View 1 (Raw)                    View 2 (Adjusted)     
    ACT     FCST     Calc          ACT     FCST     Calc
    X     X     X          X     X     X
    0     0     0          0     X     0
    0     X     X          X     0     0
    X     0     X          0     0     0
    If ACT or FCST is '0' in RAW it has replace everything with '0' in Adjusted. else copy Actual and Forecast values to adjusted.
    "case when is ([Raw],[Actuals]) = '0' or ( [Adjusted],[ Forecast]) = '0' then '0' else ([Actuals] = [Raw],[Actuals]) and [ Forecast] = ([Raw],[Forecast])" this is my formula which is validated but i don't see any result.
    Help will be very mush appreciated.
    Thanks in Advance
    Vic..

    Hi,
    I am not sure which member you are trying to write that formula on. It should be on 'Adjusted' member as that is what you want to calculate. I am not sure how your formula got validated - You can try any of these formula or modify your formula on similar lines and it should work.
    CASE WHEN ([Raw], [Act])= 0 OR ([Raw], [Fcst]) = 0
    THEN
    0
    ELSE
    [Raw]
    END
    IIF ( ([Raw], [Act])= 0 OR ([Raw], [Fcst])= 0 , 0 , [Raw])
    Regards,
    Sunil
    Edited by: sunil k on Jan 17, 2013 2:28 PM

  • Doubt Reg How to implement MDX formula in ASO Cube

    We are using Essbase 7x for implementing ASO application, We are struck in implementing MDX formuls in Accounts dimension members. As per the requirement
    We have to calculate
    Cost Per kilo[Total shipment Cost]/[Billed Weight]
    Fuel Surcharge cost per kilo[Fuel Surcharge cost]/[Billed weight]
    Need to implement these formula's for the mentioned Accounts members. As we are new to this concept plz let me know if
    we wrote these in MDX editor and how to link these to the particulr mrmber in the dimension.please help me out in implementing these formula's

    Hi,
    1. For ASO cubes also, you can have forumulas on your cube's outline individual members.
    2. If the dimension is "accounts" you can write MDX forumulas on the members of the accounts dimension
    3. The two members 'cost per kilo' and 'fuel surcharge cost per kilo' and their respective forumulas are Total shipment Cost/Billed Weight and Fuel Surcharge cost/Billed weight.
    4. If you have the members like Total shipment Cost,Billed Weight and Fuel Surcharge cost, create 2 account members for which you need to write formulas , then go to 'formula' tab of these members and write a simple division formula.For ASO cubes, no need to end them with semi colon.
    One can use MDX editor to write down queries and extract data too, i.e queries . More of it can be found in the DBAG .
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • Need help with MDX formula to sum months

    I was able to use Gary C's suggestion to sum daily data for 90 days with the following formula.
    SUM( TAIL( TUPLERANGE(
    ([FY_2006], [01/01]), ([Scenario].CurrentMember,
    [Time].CurrentMember) ), 90 ))
    This formula works great - even when crossing different years in the Scenario dimension.
    I'm now trying to sum the prior 3 months using a similar TupleRange command:
    SUM( TAIL( TUPLERANGE(
    ([FY_2006], [JAN]), ([Scenario].CurrentMember,
    [Time].CurrentMember) ), 3 ))
    I'm running into an issue due to additional parents in the time dimension. January and February of the current year are pulling data from the children of another parent in the Time dimension as opposed to Nov and Dec from prior year.
    My Time dimension is setup as follows:
    Time
    |
    |-Total Year
    | |-Jan
    | | |-01/01
    | | |-01/02...
    | |.
    | |-Feb... Dec (each month has days as children)
    |.
    |.
    |-QTDs
    | |- Various parents and shared children
    |.
    |-Weeks
    | |-FY08_Weeks
    | |.
    | |-FY09_Weeks
    Using the previous TupleRange command, when I retrieve data for Jan it retrieves data from the following members:
    Jan
    FY08_Weeks
    FY09_Weeks
    Any suggestions on how I can write the MDX formula so my 3 Month formula pulls in the correct members? (That is, it should only pull in members from the 'Total Year' parent.)

    In ASO architecture, if you want to aggregate these multiplied values you probably want to do the multiplication prior to loading so the sum of the products rolls up. Right now, you can't have the multiplication done in MDX and then have ASO aggregate. It's mostly a performance concern; you can do the multiplication and aggregation in one formula if you want.<BR><BR>The basic multiplication is just<BR> [Standard Material Per Unit] * [Units Sold]<BR><BR>To aggregate, you need to wrap in additional clauses. I've attached code here so you can see it with indenting- I believe that consistent indenting helps catch a lot of syntax errors.<BR><BR>You will also need to assign the formula to a new member (account or otherwise).<BR><BR>If you only want to see the values at level-0 and you don't want them aggregated, it's very easy:<BR><BR>iif (<BR> [Product].CurrentMember.[LEVEL_NUM] = 0,<BR> [Standard Material Per Unit] * [Units Sold],<BR> MISSING<BR>)<BR><BR><BR>

  • Make MDX formula timebased

    I have the current MDX formula in my FORMULA property of my dimension file for a member called PQR wich is the parent of ABC
    IIF(ABC<0,0,ABC)
    It simply states that the value of PQR should be the value of ABC unless ABC is smaller then zero.
    This works fine.
    However, the customer now wants to apply this formula only to timeperiods prior to 2008. So all calculations of PQR prior to 2008 should follow this formula and from 2008 onwards the negative values are allowed.
    I tried (amongst others)
    IFF(timeid<20071200,IIF(ABC<0,0,ABC),ABC)
    but that doesn't work, probably because i am mixing SQL timeid with MDX syntax. I also tried osme otherthings (especially fiddling around with brackets) but i cannot het this to work.
    How can i get this to work ?
    Thanks for some insights into the formula jungle....
    Help is greatly appreciated
    Edwin
    SAP Netherlands

    Hi Edwin,
    you should try something like :
    Iif(time.currentmember.name>"2007.DEC" and ABC<0,0,ABC,0)
    Pascal
    Edited by: Pascal THEUROT on May 26, 2008 8:11 PM

  • LGF VS MDX FORMULAS

    Hi gurus;
    What is the difference between MDX and Script Logic formulas?
    For example
    Can i write below formulas in LGF ?
    function MOVEMENT(%ACCOUNT%)
    iif(COUNT(%Time_Dim%.Children) =0,
    %ACCOUNT%-(%ACCOUNT%,%Time_Dim%.PrevMember),
    SUM(Descendants(%Time_Dim%.CurrentMember,99,LEAVES)))
    *endFunction
    If yes, Whats the meaning of 99? and Children
    The another question is IIF MDX Formulas
    Iif([Time].CurrentMember.Children.Count=0, [Account].[AccRec] - ([Account].[AccRec], [Time].PrevMember), SUM(Descendants([Time].CurrentMember, [Time].[Month], LEAVES)))
    I want to forward datas to month 8 but if month 8 is not empty , do nothing.
    My account dimension name which want to forward is : SALES_K
    account dimension member which want to forward is : K1005
    My Time dimension name : TIME current month:8 id name: 2010008
    Time period id : 2010001 , 2010002 , 2010003 ...
    Many thanx for your replies
    Have a nice day

    Hi Breathe
    You can write/use this formula.
    In your AccountRec Account calculation.,the formula indicates the sum of all receivables of all months  as per the Time Dimension, by arriving the diference of prevous month and current month.
    It starts with the identifying the data as per your Time dimesnion (from Period Id-Parent and Children), and it sum up the data of all the months i.e, all Children( ex: Time period id : 2010001 , 2010002 , 2010003 ... 2010008)
    The data will not be available at Parent level, Hence the iteration of Children calculation count will be 0 and it starts from next child in the list.
    In this statement, the count 99 indicates the number of all iterates to run the calculation formula till the end of the list as per the number of children( depends on number of child months you have defined under one parent year, in TIME Dimension) it has to calculate, as per your formula(SUM(Descendants(Time.CurrentMember, Time.Month, LEAVES)))
    for more information on the logic MDX formula, please refer the below SAP help:
    http://help.sap.com/saphelp_bpc75_nw/helpdata/en/f8/aac4ccf5a34fcdb40ba3e508a0ae0e/frameset.htm
    Hope this will help you a lot.
    A good question:) Breathe!!!
    Thanks & Regards
    ukraghu

Maybe you are looking for

  • How can I back up everything on my macbook pro on a hard drive

    Hi I was wondering how I could backup all of my stuff on my MacBook Pro to my LaCiE Porsche Design Hard Drive. When there was an update for my MacBook Pro a while back I was updating it and an error occurred so i took it to apple and he told me to al

  • Special G/L any Help pleaseee

    Hi everyone.. first at all thanx whe have got a company code (Madrid) with a chart of accounts and  special g/l  and we want to use the same"CME  (Special g/l) for another company code  (Portugal), which use another chart of accounts SAP differently

  • My computer can't read raw files from my nikon d4s in Photoshop cs6

    Hello, i have a MacBook Pro and have Os X 10.8.5 installed Photoshop CS6 can't open the raw files from my Nikon D4S. I tried to install Adobe CameraRaw 7.1 but keep getting error messages. ALso tried to install the patch to no avail. Any suggestions?

  • When I import my photos into lightroom 4 they all turn to black and white...what is going on?

    When importing the photos are color...but when I go to the develop module the all start going to black and white...before my eyes!

  • Problems with Privileges

    Hi, I have a development env of my application on my desktop, for which I am using the developer's version of Oracle 9.2.0.1.0. My tables are spread across 3 different schemas (A, C and S)and I need a common role/ user to be able to access all 3 sche