Create Jedox Cube Rule
jedox_create_ruleCreate a calculation rule for a Jedox cube with formulas like ['Profit'] = ['Revenue'] - ['Cost']. Supports multi-dimensional qualifiers and immediate activation.
Instructions
Add a calculation rule to a Jedox cube.
Jedox rules use a special syntax with single-quoted element names: ['TargetElement'] = ['ElementA'] + ['ElementB'] ['Profit'] = ['Revenue'] - ['Cost'] ['Growth%'] = (['This Year'] / ['Last Year'] - 1) * 100
Multi-dimensional rules restrict which cells they apply to using dimension qualifiers: ['Profit']:['Jan'] = ['Revenue']:['Jan'] - ['Cost']:['Jan']
Rules take precedence over consolidation. Be careful not to create circular references.
Args:
database_id: Numeric ID of the database
cube_id: Numeric ID of the cube
definition: The rule formula (use single quotes around element names)
comment: Optional description (default: empty)
activate: Whether to activate the rule immediately (default: true)
Returns: { id, definition, active }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | ||
| cube_id | Yes | ||
| definition | Yes | Jedox rule formula. Use single quotes around element names, e.g.: ["Profit"] = ["Revenue"] - ["Cost"]. Note: in JSON you must escape the quotes as \"Profit\" etc. | |
| comment | No | Optional comment/description for the rule. | |
| activate | No | Whether to activate the rule immediately. Default: true. |