Create Calculation

The MaxL create calculation statement helps you create, replace, or copy a stored Essbase calculation.

Permissions required:

  • Database Manager to create database-level calculations.

  • Application Manager to create application-level calculations.

Syntax


Description of crecalc.gif follows
Description of the illustration crecalc.gif

Use create calculation to create a calculation in the following ways:

Keywords

create calculation

Create a calculation script, the body of which is specified by CALC-STRING.

create or replace calculation

Create a calculation script, the body of which is specified by CALC-STRING. If a calculation script of that name already exists, it is replaced.

create calculation as

Create a calculation as a copy of another stored calculation.

Notes

  • When creating database-level calculations, this statement requires the database to be started.

  • A stored calculation can be associated with an application/database, or with an application only. To create an application-level calculation, use two tokens for CALC-NAME. To create a database-level calculation, use three tokens. See CALC-NAME for more details.

  • Calculations created using MaxL must be valid. For information about calculation syntax, see Understanding Calculation Script Syntax.

Example

create or replace calculation sample.basic.Accts
'SET UPDATECALC ON;
CALC DIM(Accounts);'
;

Creates a calculation named Accts that is associated with sample.basic.

create calculation sample.basic.Accts2 as app.db.Accts

Creates a calculation named Accts2 on sample.basic that is a copy of another database's calculation named Accts.