Start of Content Area

Function documentation Data Functions  Locate the document in its SAP Library structure

Use

When defining a formula or calculated key figure, you can use the following data functions as operators.

Features

Note

NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, see Technical Notes About the Formula Operators.

Value = 1 if operand <> 0, otherwise 0 (numerator)

      COUNT(<Expression>)

Returns value 1 if the <expression> is <> 0, otherwise 0.

Processing a value as a date

      DATE

The value is seen as the number of days from 01.01.0000 and is displayed as a date.

The value can be between 0 and one million, which results in a date between 01.01.0000 and 27.11.2738.

Value = 1 if operand = 0, otherwise 0

      DELTA(<Expression>)

Returns value 1 if the <expression> is 0, otherwise 0.

Caution

This function is identical to the NOT operator and should not be used anymore.

NDIV0 (x): Equals 0 when divided by 0, otherwise x

      NDIV(<Expression>)

Is 0 if the calculation of <expression> causes a division by 0. Otherwise the result is the value of the expression. Used to avoid error messages or so that you can continue to calculate with a defined result.

Values Without Dimensions (Without Units)

      NODIM(<Expression>)

Returns purely numerical values of <expression> and suppresses units and currencies.

Note

You can use this function to prevent the system from displaying the “mixed currency” character. See SAP Reference IMG SAP Customizing Implementation Guide SAP NetWeaver Business Warehouse Settings for Reporting and Analysis General Settings for Reporting and Analysis Display of Numeric Values in the Business Explorer.

NOERR (x): Is equal to 0 for undefined calculations, otherwise x

      NOERR(<Expression>)

Is 0 if the calculation of <expression> causes an arithmetical error. Otherwise the result is the value of the expression. Used to avoid error messages or so that you can continue calculating with a defined result.

Example

NOERR(SQRT(-1)) = 0

Result

      SUMCT <Operand>

Returns the result of the operand to all rows or columns (more information: Percentage Functions % CT).

Example table for operator SUMCT <Operand>

Year

Region

Sales

SUMCT “Sales”

1999

North

30

60

 

South

30

60

 

Result for 1999

60

180

2000

North

60

120

 

South

60

120

 

Result for 2000

120

180

Overall result

 

180

180

Overall result

      SUMGT <Operand>

Returns the overall result of the operand (more information: Percentage Functions %GT).

Example table for operator SUMGT <Operand>

Year

Region

Sales

SUMGT “Sales”

1999

North

30

180

 

South

30

180

 

Result for 1999

60

180

2000

North

60

180

 

South

60

180

 

Result for 2000

120

180

Overall result

 

180

180

Query Result

      SUMRT <Operand>

Returns the query result of the operand (more information: Percentage Functions %RT).

Unlike the process for calculating the overall result, dynamic filters are not used in the calculation of the query result. This means that the calculation always normalizes to the same value, irrespective of the filter status and the navigational state.

Example table for operator SUMRT <Operand>

Year

Region

Sales

SUMRT "Sales"

1999

North

30

180

 

South

30

180

 

Result for 1999

60

180

Overall result

 

60

180

The year 1999 is in the dynamic filter. The missing sales (120) come from the year 2000 (see SUMGT).

Processing a Value as a Time

      TIME

The TIME operator takes any key figure or (partial) formula and makes a key figure of type TIME. Go to the formula editor. For the operator, double-click the Process Value as Time data function. For the operand, double-click the key figure you want. The formula could then be TIME(Sales).

The system cuts off the decimal places, interprets the value as seconds, and displays the value in format +-hh:mm:ss. -4812 is displayed as 1:20:12 for example.

Any number is seen as the number of seconds from 00:00:00 and is displayed in hours, minutes, and seconds. A key figure of type TIME with value 0 is displayed as 00:00:00.

Negative times are permitted: With a negative number, the system calculates backwards from 00:00:00.

You can enter any number of hours. After 24 hours, the system does not restart again at 0.

Example

This function is designed for offset calculations in particular. For example, if you have time key figures and want to deduct 4 hours, you can use the TIME operator.

 

End of Content Area