Calc Function in Essbase

Can some on explain the below expression what exactly it returns as a result.i don't know this function "@JNthMbr" and "@Name".
I know that @Member function returns with the name of the member.
(@ISMBR(@Member(@JNthMbr(@Name(@Descendants("Year")), 1))))

What's in your Years dimension? FY10, FY11, FY12, etc? Or 2010, 2011, 2012? Or Jan, Mar, Feb? Or Jan FY10, Mar FY10, Apr FY10, etc?
I am guessing that you have a Custom Defined Function (CDF) at play here with the @JNthMbr. I did a quick search at the samplecode.oracle.com Date CDF and don't see that function, so perhaps you have one custom written (they are called CDFs after all).
@NAME converts a member name to a string which I'll bet the CDF requires. If you look at the 11.1.1.3 example, it even shows passing a member name to a CDF. See: http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/name.htm
Once the CDF is done, it needs to convert that string back into a member name. That's what @MEMBER does. See: http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/member.htm
And then there's an @ISMBR test to see what the member value is. I'm a little unclear why all of the trouble was gone through as the members of the dimension can just be tested like this: IF(@ISMBR(membername)) So why all the complexity? No one writes a CDF for fun (okay, some people do, but not many).
Is the code figuring out a month based on a quarter? Or a Year Total? That's hard to guess without knowing what your Years hierarchy looks like.
Regards,
Cameron Lackpour
Edited by: CL on Oct 7, 2010 5:49 AM
Edited because I couldn't concentrate long enough to finish the @ISMBR sentence.

Similar Messages

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • Unable to execute the substitution variable in calc scripts in essbase 11.1

    Unable to execute the substitution variable in calc scripts in essbase 11.1.3
    FIX(&CURRVERSION,COLA)
    Unit=units*Listprice;
    dataexport "file" "," "E:\NEW.TXT";
    ENDFIX
    Error: 1200471 Error parsing formula for FIX STATEMENT (line 1): expression expected before [)]
    This is error it throws when executing the calculation script
    I wonder whether its a problem with substitution variable i want to know wat went wrong inside the fix statement
    I have created substitution variable use maxl
    Installed the essbase in custom manner and standlone mode nt register with the shared services ,
    Is this problem with the custom installation of essbase
    Regards
    shenna

    If you remove the substitution variable and replace it with the actual value (whatever that is), does the code work? That will tell you if the issue is around the substitution variable or not.
    John -- First you race Glenn, then you race me -- and you always win. :)
    Regards,
    Cameron Lackpour

  • Using "calc' function to show if the cell is editable(EVDRE Reports)

    Hello All,
    I have a question regarding using the "calc' property in my dimension 'ACCOUNT' in a EvDRE report to display the rows as calculated or input ready cells. I have developed an input template by opening a blank workbook and typing in EVDRE(). I have listed ACCOUNT to be in the rows and Time in the columns. I have listed the memberset to be members in the ACCOUNT and SELF, DEP in the Time dimension. Whenever I expand the EVDRE, I always get the cells to be 'yellow' in color similiar to the calc format. How do I differentiate between the Calculated cell and the input cell. I was thinking to use the CALC functionality similiar to the reports/input schedules written using EVGTS/EVSND functions.
    Any help is appreciated.
    Thanks.

    Hi  bpc4livin,
    Take note that even though you have specified the base members as memberset in your EVDRE, still you must have base level members in your Current View in the Action pane. Remember that each data cells in an EVDRE template is an intersection of the dimension in your rows and columns plus the rest of the dimensions in your application which would come in your current view if you don't define them as memberset. So as long as there is one calculated member in your current view still the cell would be marked as calculated.
    You can use EVDRE's format range to format a scpecific cell or group of cells. To activate this after you typed the EVDRE and refresh the sheet, you must check the allow formatting option in the EVDRE builder that appears. I think that there is already a default format in the format range that says that if a data cell is calculated it would be colored yellow. So if you want further knowldege on how to use the format range, you could see the Using Reports Help in the See Also section of the action pane of the BPC Excel.
    Hope this helps,
    MVS

  • Steps to install Custom Defined Function in Essbase and Planning

    Hi,
    We want to write some CDF in Essbase which we can use in Calc Scripts in Essbase and Business Rule in Planning.
    Can someone plz share the steps describing which all files to update how to install and configure. Details will be helpful.
    Regards,
    GS

    By the name, with parameters you were defining :)
    For example,
    @JExportTo("file","c:/flat.txt",",","",
    @LIST(
    @NAME(@CURRMBR(Market)),
    @NAME(@CURRMBR(Product)),
    @NAME(@CURRMBR(measures)),
    @NAME(@CURRMBR(year))),
    @LIST(actual,budget,Variance))

  • To expand the filter functions in essbase

    Hi All,
    Please help me to expand the filter functions in essbase like @LIST, @ IDESCENDENTS, @DESCENDENTS , @REMOVE. My expected resulted is the member names in the outline that is indicated by the filter.
    This is to get the member names to which a filter definition represents.
    For example
    If A has three children A1, A2 and A3 and i have a function @IDESCENDENTS(A), then i need a result as A1, A2 and A3.
    This is just an example, I am trying for complex one.

    Go through
    http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_techref/funcs/funclist.htm
    There are many commands to select members in a dimension. You can select particular generation using @genmbs anr level members using @levmbre or you can use @relative. You can tag uda if you want to select members randomly.
    Technical reference is the best place to start about calculation commands.

  • Error Using DataExport function in Essbase

    Hi there,
    I'm using Hyperion Essbase version 9.3.1.
    And rite now I'm trying to export data in Essbase by the new CalcScript function DataExport directly to SQL server.
    I have 11 dimensions in my Essbase application. I did create 10 fields in SQL server for storing members information and 12 other fields for periodic data. Just, the time when I export data, all the rows returned with only 7 fields for members information and 12 data fields for periodic data.
    Can anyone help? Please help!
    Best regards,
    Antony

    Antony,
    So when you use a calc script like the below:
    SET DATAEXPORTOPTIONS
         DataExportLevel ALL ;
         DataExportDynamicCalc OFF ;
         DataExportRelationalFile ON ;
         DataExportOverwriteFile ON ;
    DATAEXPORT "File" "," "b:\exports\jan.txt" "#MI";
    Your export works just as you want? (I realize you have lots of other logic, but for the sake of argument use the above).
    And then when you take the exact same code except that the DATAEXPORT command now looks like:
    SET DATAEXPORTOPTIONS
         DataExportLevel ALL ;
         DataExportDynamicCalc OFF ;
         DataExportRelationalFile ON ;
         DataExportOverwriteFile ON ;
    DATAEXPORT "DSN" "cur_sale" "newyork" "admin" "password";
    You don't get the same results?
    I get the same results regardless. Yes, one is written to a table as defined by the DSN and the other a text file but the contents are exactly the same.
    Are you seeing different rows/columns? If so, that would either suggest your table is somehow limiting what gets written to the RDBMS (it would be nice to think that Essbase would log this as an error/fail) or there is a bug in the export. I have not come across this issue.
    Regards,
    Cameron Lackpour

  • How to get TRIMMEAN  excel function in Essbase

    Hi,
    I am in Essbase 11.1.2, where we have a requirement to calculate avg of some value by following Excel function business use in Excel.
    IF(TRIMMEAN(AS13:AZ13,$BA$11)<0,0,TRIMMEAN(AS13:AZ13,$BA$11))
    just wanted to know if anyone use this in Essbase or any workaround to get this function value in Essbase.
    -KP

    You have to go through DBAG for more info on @XREF
    here is example of script we use
    SET UPDATECALC OFF;
    FIX(members in employee, members in entity)
    SET CREATENONMISSINGBLK ON;
    "Account_1" = @XREF(_Location alias, "PRODUCT");
    ENDFIX
    what we do is pull data from account_1 of databse 2 to database 1.
    you should specify location alias in database before executing this script.
    good luck.

  • Function in Essbase Add-In

    <p>In Excel, you can click on the fx that's beside the formula barto display the Insert Function window. There's a category called"Essbase Add-In" in the drop-down list box.</p><p> </p><p>Which directory would I paste my macro excel file, in order forthe macro function to display in this list?</p><p> </p><p>Thanks in advance.</p>

    Wouldn't HypQueryMembers do what you want?
    It sounds exactly like EssVGetMemberInfo, right down to the number 6 being the same generation.
    Regards,
    Cameron Lackpour

  • Problem with time series functions against Essbase

    Hello all,
    I'm having problems with displaying correct results when using AGO function in OBIEE. I'm using Essbase 9.3.1 and OBIEE 10.1.3.4.1. Logical column named MAGO1 is created in repository like this: IFNULL( AGO("Measure01", Time.Month, 1), 0). In Answers when I use columns Measure01,MAGO1,Time.Month with filter just on Time.Month column results are OK. When I put another filter, for example Dim1.Gen2,Dim1, MAGO1 returns zero as a result. But when I put Dim1.Gen2,Dim1 also as a column and as a filter results are OK. I don't want to have Dim1.Gen2,Dim1 as a column but just in a filter. Also hiding column is not an option. I want to have grouped results and not multiple rows for one month if I remove filter Dim1.Gen2,Dim1. Filter is selected on prompt in dashboard and can be some value from Dim1.Gen2,Dim1 or All Choices. Reason for this is that I'm using this answers report as a data source for BI Publisher so additional formatting on answers report isn't helpful.
    I am suspecting that something is wrong with hierarchy it time dimension or other dimensions. Or maybe MDX is not generated right ? If you need more details regarding my repository or configuration please feel free to ask. Any help is greatly appreciated.
    Thanks,
    D.

    I am using BI Publisher and Answers report as data source. Making changes like hiding column or displaying results as pivot table won't help in this case.
    Anyway I did discover something else. When I put in report logical columns with ago function they return correct results. But when I add additional logical column with todate function all logical columns with ago and todate function return zero as a result. Also this happens only when result is more than one row. If you have only one row, for example grand total level of dimension, than result is OK, but if you have more rows on a lower level than zero values appear.
    Some columns that are used in filter do not appear as columns in report. This is the main problem. If I put all columns that are filtered in report than the result is OK. But I don't want to do this because I want to have option to select values on dashboard prompt on different levels.
    Hope this narrows the problem.
    Thanks,
    D.

  • RATE function in Essbase

    Does anyone know how to get an Essbase function equivalent to the RATE function in Excel?<BR><BR>Regards,<BR><BR>Pablo

    Here is what you need to do:<BR><BR>Java code:<BR><BR>public static double Rate(double npr, double pmt, double Pv, double Fv,double guess, double error){<BR>          double rate = 0.01;<BR>          <BR>          if (guess > 0)<BR>               rate = guess / 100;<BR>          double a = 0.0;<BR>          if (pmt == 0) {<BR>               return (Math.pow(Fv/Pv,1/npr) - 1) * 100;<BR>          } else {<BR>               while(1==1) {<BR>                    a = Pv * rate * Math.pow((1 + rate),npr) / ( Math.pow(1 + rate,npr)- 1);<BR>                    System.out.println(a);<BR>                    if ( Math.abs(a - pmt) < error) {<BR>                         return rate * 100;<BR>                    } else if (Math.abs(a) > pmt) {<BR>                         rate -= 0.00001;<BR>                    } else {<BR>                         rate += 0.00001;<BR>                    }<BR>               }<BR>          }<BR>          <BR>     <BR>     }<BR><BR><BR>MAXL to register the CDF:<BR><BR>CREATE OR REPLACE FUNCTION '@JRate'<BR>AS 'com.hyperion.essbase.cdf.stats.Stats.Rate(double,double,double,double,double,double)'<BR>SPEC '@JRate(npr, pmt, Pv, Fv, guess, error)'<BR>COMMENT 'Return the rate where npr: number of payments, pmt: periodic payment, Pv: present value, <BR>Fv: future value, guess: rate guess (If 0 then the default is 10%), error: error tolerance on payment estimate';<BR><BR><BR>Usage in a clac script:<BR><BR>Example 1: Number of payment = 26, Present Value = 500, Future Value = 572. What is the rate?<BR>@JRate(26,0,500,572,5,0.1) = 0.5188%<BR>Excel returns RATE(26,0,-500,572) = 0.5188%<BR><BR><BR>Example 2: Number of payment = 360, Payment = 665, Present Value = 100,000. What is the rate?<BR>@JRate(360,665,100000,0,5,0.1) = 0.5829%<BR>Excel returns RATE(360,665,-100000) = 0.5830%<BR><BR>Send me your direct email address if you want the actual files.<BR>

  • CDF function in essbase

    HI,
    I'm planning to use a cdf function in my essbase outline -
    '@JgetMonthNumberWorkDays(2009, 1, "aus")'
    Now my question is..can we pass other essbase functions within this cdf and make it work ?
    e.g. Will something like below work?
    '@JgetMonthNumberWorkDays(@CURRMBR (year), @CURRMBR (period), "aus")'
    where year dimension is 2010,2011 and so on
    and period dimension is jan,feb and so on.
    Any pointers will be appreciated!!
    Edited by: whirlpool on Aug 7, 2012 7:18 AM

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • Ago function against Essbase

    Hi,
    I'm finding very big problems in using AGO function against a Essbase source (BIEE 11g & EPM 11.1.2).
    Any experiences on that?
    any feedback will be apreciated,
    Regards,
    Daniele

    Hi Peak,
    I'm not able to make it works, differents errors are generated:
    sometimes:
    SQOIMDXGeneratorHyperion.cpp
    others:
    [nQSError: 96002] Essbase Error: Syntax error in input MDX query on line 10 at token '[' (HY000)
    I'm building simple query on these cubes...
    I'll try to describe you better the problems asap...
    But I'm looking if I'm the only finding this issues (and is related to my environment) or if someone else found this kind of problem.
    Regards,
    Daniele

  • Best Calc Function

    Hi,
    We have a cube which has following Dimensions,
    Period - Jan to Dec
    Scenario - Actual , Outlook (inputs)
    View - YTD , MTD
    YTD has a dynamic calculation to calculate Year to date value.
    Substitution variable CurPrd holds the Current Period.
    Now we need to change the OUTLOOK Year To Date by calculating as below,
    * Say CurPrd is Apr,
    * OUTLOOK Year To Date Value should be, Actual->Jan + Actual->Feb + Actual->Mar+ Actual->Apr + OUTLOOK->May + OUTLOOK->Jun....Dec
    So depending on the *&CurPrd* the YTD Outlook should calculate dynamically,
    Let us know the best function to use with example.
    Thanks!

    OUTLOOK Year To Date Value should be, Actual->Jan + Actual->Feb + Actual->Mar+ Actual->Apr + OUTLOOK->May + OUTLOOK->Jun....DecThis represents full year value as on that month. calculating this for YTD is not correct as it deviates from the definition of YTD.
    Keep the YTD formula for outlook same as actual.
    Better create another dynamic calc member FY_OUTLOOK in the View dimension.
    I think Substitution variable CurPrd represents the current reporting month for which already actuals have been loaded.
    you can write a below formula to calculate FY_OUTLOOK
    if(@ismbr(Outlook))
    YTD->"Actual"->&CurPrd + YTD->"outlook"->"Dec" - YTD->"outlook"->&CurPrd;
    Endif

  • Calc Manager for Essbase Hangs with multiple users

    I use Calc manager to run rules directly against Essbase. My problem is when multiple users try to run rules (in separate applications). First user the rule will run immediatly, but the 2nd user will be a Launch Status box that is just blank, nothing will run for the 2nd user until the 1st users calc script is done.
    I've tried deploying all the rules (in both Apps), hoping that would fix it, but it doesn't.
    Any thought how I can make several users run at the same time?
    Chad

    Hello Chad,
    this looks strange. The users are using a different UserID ?
    You could have a look at the access rights for these users.
    They launch them from the Workspace I suppose?
    Do they use the same objects like Runtime Prompt?
    I have more experience with the Calc Manager on Planning and not directly on Essbase.
    Maybe your answers could help finding the cause.
    Regards,
    Philip Hulsebosch

Maybe you are looking for

  • Nokia 6300 problem

    I connected it up to the Computer, to download some media. Then all of a sudden it flashed a couple of times and turned off. I tried to turn it back on again, and it just flashes and turns off. I tried connecting back to the computer and the computer

  • ARTADM: libcobrts64.so : cannot open shared object file

    While doing the Tuxedo server startup i am getting error message: ARTADM: error while loading shared libraries: libcobrts64.so: cannot open shared object file: No such file or directory. Getting the same error message for ARTCNX, ARTSTRN. I did verif

  • Having trouble creating Recovery Media

    Hello everyone I bought a new Lenovo disk and tried to install XP with some previous recovery Media but it doesn't seem to detect the second DVD disk during the recovery so I am forced to create a new set of recovery media. The only issue is that the

  • Insert entreis in table

    Hi experts,          I was created a one custom componant.But i am unable to insert and Edit the record in that tabular format.kindly give the solution it's very needful Regards, Anush.

  • I've been stealing my iPhone

    I've been stealing my iPhone was closing and waited for two weeks tried to wait, and not running thief my phone and mistakenly deleted the phone from the site Find phone by icloud my account and I have proof of it my phone, please help me