Using Custom-Defined Macros

You can use custom-defined macros like native calculation commands in calculation scripts or formulas.

  To use a custom-defined macro:

  1. Create or open an existing calculation script or formula.

    • If it was registered locally, you must use a calculation script or formula within the application in which the macro was created.

    • If it was registered globally, you can use any calculation script or formula within any application on the Essbase Server.

  2. Add the custom-defined macro to the calculation script or formula.

    For example, to use the @COUNTRANGE custom-defined macro shown earlier in this chapter, create the following calculation script:

    CountMbr = @COUNTRANGE(Sales, Jan:Dec);

    Use this calculation script with the Sample.Basic database, or replace “Sales, Jan:Dec” with a range of members in a test database.

  3. Save the calculation script or formula, and then run it as usual.