Create Calculated Accounts in Charts

In SAP Analytics Cloud, the Calculated Account calculation creates a new account that you can use in your chart.

Accounts, are numerical values on which you can use mathematical functions. When setting up your calculation, you’ll apply the typical formula functions, conditions, and operators to the data contained in your model.

Calculated accounts allow you to perform mathematical and Boolean operations on your data. For example, you can use a calculated account to chart the effect a sales increase of 20% would have on profits.

Functions, Conditions, and Operators

The following functions, conditions, and operators are available for creating calculated accounts. For descriptions of each option, see All Formulas and Calculations.

Functions

Functions

IF()

POWER()

NOT()

ISNULL()

ABS()

GrandTotal()

TRIM()

SPLIT()

LOG()

%GrandTotal()

FINDINDEX()

SUBSTRING()

LOG10()

LENGTH()

RIGHT()

LEFT()

INT()

DOUBLE()

ENDSWITH()

LIKE()

FLOAT()

MEASURELOOKUP()

   

Conditions

Conditions:

AND

OR

> (greater than)

< (less than)

>= (greater than or equal)

<= (less than or equal)

= (equal)

!= (not equal)

Operators

  • + (addition)

  • - (subtraction)

  • * (multiplication)

  • / (division)

Create a Calculated Account

  1. Select a chart.

  2. Open the Calculation Editor: in Builder, choose Start of the navigation pathAdd Account Next navigation step Calculations Next navigation step Create CalculationEnd of the navigation path.

    The Calculation Editor appears.

  3. Select Calculated Account from the list.

  4. Enter a name for the calculated account.

  5. (Optional) Enter a description.

  6. Enter a formula in the Edit Formula area.

    Existing input controls appear in the Available Objects list, and can be added to a formula.

    You can add preset functions, conditions, and operators, by selecting options in the Formula Functions list. You can use IF conditional functions, and you can display a list of possible formulas for the function by pressing Ctrl + Space bar.

    The formula editor supports auto-complete and the following shortcuts:
    • [ – Returns all relevant accounts:

      • Adding a calculation to the Account dimension: shows Account dimension members.

    • # – Returns all calculations (that is, measures created using the Calculation Editor).

    • @ – Returns input controls. (Only single value numeric input controls are returned.)

  7. (Optional) If you want to verify that your formula is formatted correctly, select Format: it may reformat your formula before displaying a valid formula message.

    In the Formatting dialog box, define Scale, Scale Formatting, Decimal Places, Show Sign As(+ / - or ( ) or Δ or ↓ / ↑), and Unit. You can either choose to select the underlying unit of measure.

  8. Select OK.

An account is created based on the formula you entered, and it is displayed as a new account dimension.

If the formula uses an input control, it will appear on the canvas.

Create a Calculation Input Control

You can choose to create a calculation input control for your calculated account.

  1. Under Input Controls, select Create New.

  2. Enter a name for the input control.

  3. (Optional) Enter a description.

  4. Select Existing Dimension to allow users to pick from members of a dimension, or Static List to add custom values as options for the input control.

  5. Select OK.

    The input control you created appears under Available Objects.

  6. Select the input control to add it to a formula.

Existing Dimension

Static List

  1. Select a model and a dimension.

  2. In the Input Values section, select Click to Add Values and choose either Select by Condition or Select by Member.

    • Select by Condition: use the set conditions dialog to specify conditions and restrictions.

      For more information, see Use Conditions to Apply Filters.

    • Select by Member:

      1. Select values from the list of available members.

        To exclude one or more members, select All Members, and then deselect the checkbox for each member that you want to exclude.

      2. Expand the Settings for Users section, and then choose whether users can do the following actions in the input control: Single Selection, Multiple Selection, or Multiple Selection Hierarchy.

  3. Select OK.

In the Input Values section, select Click to Add Values and choose either Select by Range or Select by Member.

  • Select by Range: specify a range for a numeric slider.

    1. To create a numeric slider, enter the Min and Max values for your range in the Set Values for Custom Range dialog.

      You can optionally set an Increment value for the slider.

    2. Select OK.

  • Select by Member: create an input control based on a defined set of members.

    1. To create a member based input control, add numeric values to the Custom Members area in the Select Values from Custom LOV dialog, and then select Update Selected Members.

    2. Expand the Settings for Users section, and then choose whether users can do the following in the input control: Single Selection, or Multiple Selection.

    3. Select OK.

On the canvas, input controls are indicated by the (Formula) icon. If you hover over the icon, all calculations associated with the input control are displayed. By default, the input control is displayed in token mode where input values can be selected from a drop-down list. The input control can be expanded into widget mode, where radio buttons appear beside each value.