Reference: Level Modifiers for Formulas
Definition of Level Modifier
Level modifiers slice the data from the account to include only the value of specific levels.
Syntax in Documentation
A few notes on syntax in documentation:
- We use capital letters in parenthesis, like (N), or text inside chevrons, like <account_code>, to indicate variables. You must replace the variables with valid constants, account references, or formula expressions.
- We use commas to separate terms, according to the standard of many countries. If your browser uses commas as decimal points, you must separate the terms with semicolons.
- We add spaces to make the formulas readable, although they're not necessary. You can also add spaces or leave them out of your formulas.
- We capitalize functions, such as Divf, and use all caps for elements, like ACCT, but formulas aren't case sensitive.
Limitations of Level Modifiers
- Adaptive Planning sheets display an error for valid formulas when you:
- Modify by levels that you can’t access due to access rules.
- Add level modifiers to an account reference that has a privateData Privacy Setting. Example: In the settings for ACCT.001, theData Privacy Settingmust beValue of Account is Public at all Levelsfor this formula to be valid: ACCT.001 [level = level_code]. See Concept: Data Privacy Setting for Accounts.
- Reference level codes that use restricted words. See Reference: Best Practices for Codes and Names of Metadata.
- Reference a level that isn't available in the current version availability. See Change Level Availability.
- We won’t apply level modifiers to assumption accounts because assumption accounts have the same value for all levels.
- Level modifiers can’t be applied to ROW references in modeled sheets because the ROW must reference the level in the row. However you can modify a modeled account with level modifiers from another sheet.
Best Practices for level (+) and level (-)
level (+)
and level (-)
- To reference parent levels, always use.level = <parent_code> (+)
- To reference (only) levels, always use.level = <parent_code> (-)
- Avoid. It is only valid for formulas at the (only) level of the same parent. Instead replace withlevel = this (+).level = <parent_code> (+)
- Avoidalthough it is valid in most cases. Dropping the (+) from the parent rollup returns the (only) level values instead of the rollup values at the the related (only) level.level = <parent_code>
- Never usefor any reason.level = this (-)
level = <parent_code> (+)
Syntax and Examples of Level Modifiers
For the examples in the table, the level hierarchy and values for ACCT.02 are:
Level [code] | Jan 2025 |
|---|---|
- Sales [Sales] | |
Sales-North [SN] | 50,000 |
Sales-South [SS] | 100,000 |
Sales (only) [N/A] | 20,000 |
Total - Sales | 170,000 |
Syntax | Description | Example |
|---|---|---|
level = this | Use on any level to refer to the same level as the current intersection. Using this is unnecessary in most cases because by default it’s implied that the level is “this level” unless you indicate a different level. | Formula Location: ACCT.001 for Sales-South level. Formula: ACCT.02 [level = this] Returns : 100,000 |
level = this (+) | Use in (only) levels only to refer to the rollup value of the parent level. Returns the value of [level = this] when for all other levels other than (only) level. | Formula Location: ACCT.001 at the Sales-South level. Formula: ACCT.02 [level = this (+)] Returns : 100,000 Formula Location: ACCT.001 at the Sales (only) level. Formula: ACCT.02 [level = this (+)] Returns : 170,000 |
level = this (-) | Do not use. Returns unexpected results, or we ignore it. | N/A |
level = <level_code> | Use on any level to refer to any level. You must replace <level_code>, including the chevrons, with an exact level code in your model. We return an error if the referenced account does not have public Data Privacy Setting .If your referencing a parent level, we automatically include (+). Removing it doesn't return the rollup value in (only) levels. | Formula Location: ACCT.001 at any level. Formula: ACCT.02 [level = SN] Returns : 50,000 |
level = <level_code> (+) | Use when you modify an account with a parent level. You must replace <level_code>, including the chevrons, with an exact parent level code in your model. Returns the rollup value of all child levels. If there aren’t any child levels, we remove the modification. | Formula Location: ACCT.001 at any level. Formula: ACCT.02 [level = Sales (+)] Returns : 170,000 |
level = <level_code> (-) | Use when you modify an account with a parent level. You must replace <level_code>, including the chevrons, with an exact parent level code in your model. Returns the value in the (only) level of the parent level. This is the only way to reference the account value of an (only) level because (only) levels don’t have specific codes. | Formula Location: ACCT.001 at any level. Formula: ACCT.02 [level = Sales (-)] Returns : 20,000 |