You are on page 1of 27

PUBLIC

SAP Analytics Cloud

2020-07-30

Advanced Formulas Reference Guide


Table of Contents
1. OVERVIEW ............................................................................................................................................. 4
1.1 Introduction to Advanced Formulas.................................................................................................... 4
1.2 Notation Convention ............................................................................................................................ 4
1.2.1 Symbols ............................................................................................................................................. 4
1.2.2 Syntax Term Representations .......................................................................................................... 5
2. CONFIGURATION FUNCTIONS.............................................................................................................. 7
2.1 CONFIG.TIME_HIERARCHY ................................................................................................................. 7
2.2 CONFIG.GENERATE_UNBOOKED_DATA........................................................................................... 7
2.3 CONFIG.FLIPPING_SIGN_ACCORDING_ACCTYPE ........................................................................... 7
2.4 CONFIG.HIERARCHY ........................................................................................................................... 7
2.5 CONFIG.TIME_ZONE_OFFSET ............................................................................................................ 7
2.6 CONFIG.HIERARCHY.INCLUDE_MEMBERS_NOT_IN_HIERARCHY .................................................. 7
3. MEMBER SCOPE DEFINITION ............................................................................................................... 8
3.1 MEMBERSET ........................................................................................................................................ 8
4. VARIABLES ............................................................................................................................................ 9
4.1 VARIABLEMEMBER ............................................................................................................................. 9
4.2 INTEGER............................................................................................................................................... 9
4.3 FLOAT................................................................................................................................................... 9
5. WRITE BACK FUNCTIONS ................................................................................................................... 10
5.1 DATA () ............................................................................................................................................... 10
5.2 DATA.APPEND () ................................................................................................................................ 10
5.3 DELETE .............................................................................................................................................. 10
6. CALCULATION EXPRESSIONS ........................................................................................................... 12
6.1 RESULTLOOKUP () ............................................................................................................................ 12
6.2 LINK .................................................................................................................................................... 12
6.3 ATTRIBUTE ........................................................................................................................................ 12
6.4 CARRYFORWARD.............................................................................................................................. 13
6.5 Time Functions .................................................................................................................................. 13
6.5.1 DAY ()............................................................................................................................................... 13
6.5.2 MONTH () ......................................................................................................................................... 13
6.5.3 YEAR () ............................................................................................................................................ 14
6.5.4 DAYSINMONTH () ............................................................................................................................ 14
6.5.5 DAYSINYEAR () ............................................................................................................................... 14
6.5.6 DATERATIO () .................................................................................................................................. 15
6.5.7 DATEDIFF () ..................................................................................................................................... 15
6.6 Mathematical Functions..................................................................................................................... 16
6.6.1 ABS .................................................................................................................................................. 16
6.6.2 LOG.................................................................................................................................................. 16
6.6.3 LOG10 .............................................................................................................................................. 16
6.6.4 MOD ................................................................................................................................................. 17
6.6.5 POWER ............................................................................................................................................ 17
6.6.6 SQRT................................................................................................................................................ 17
6.7 Conversion Functions ....................................................................................................................... 18
6.7.1 ROUND............................................................................................................................................. 18

2
6.7.2 FLOOR ............................................................................................................................................. 18
6.7.3 CEIL ................................................................................................................................................. 19
6.7.4 TRUNC ............................................................................................................................................. 19
7. MASTER DATA FUNCTIONS................................................................................................................ 20
7.1 ELIMMEMBER .................................................................................................................................... 20
7.2 BASEMEMBER ................................................................................................................................... 21
7.3 Time selection .................................................................................................................................... 21
7.3.1 PREVIOUS () .................................................................................................................................... 21
7.3.2 NEXT () ............................................................................................................................................. 21
7.3.3 FIRST () ............................................................................................................................................ 22
7.3.4 PREYEARLAST () ............................................................................................................................ 22
7.3.5 PERIOD ()......................................................................................................................................... 22
8. ITERATION ........................................................................................................................................... 23
8.1 FOREACH ........................................................................................................................................... 23
8.2 FOREACH.BOOKED ........................................................................................................................... 23
9. CONDITION........................................................................................................................................... 24
9.1 IF ELSEIF ............................................................................................................................................ 24
10. MISCELLANEOUS .............................................................................................................................. 26
10.1 TODAY () ........................................................................................................................................... 26

3
1. Overview
Use this reference guide to learn about the syntax and semantics of advanced formula steps in SAP Analytics
Cloud data actions. It’s meant for administrators with an understanding of planning processes and models
within SAP Analytics Cloud.
You don’t need previous scripting experience, though. Advanced formula steps use their own scripting
language, which is similar to account-based formulas in SAP Analytics Cloud models. If you write SQL script,
you’ll also recognize some instructions.

1.1 Introduction to Advanced Formulas

Advanced formula steps in data actions give you a lot more flexibility to run calculations on planning model
data. The calculation results are stored in the base cells of the model, which means that you can run
calculations and copy data across different sets of filters.
Similar syntax is available when creating account formulas, but most of that syntax is function-based. Planning
with advanced formulas requires more procedural functionality, so it exists as a separate language.

1.2 Notation Convention

This reference uses syntax notation very similar to Backus-Naur Form (BNF), a notation technique used to
define programming languages.

1.2.1 Symbols

This reference guide uses the following symbols to show the relationships between syntax terms.

Symbol Description

<> Angle brackets surround the name of a syntactic element.

::= The definition operator defines the element that appears to its left.

[] Square brackets indicate optional elements in a formula.

You can choose whether to specify or omit optional elements in your script.

{} Braces group elements in a formula. Repeating elements (zero or more elements)

can be specified within brace symbols.

| The alternative operator indicates that the portion of the formula following

the bar is an alternative to the portion preceding it.

[…] An ellipsis with square brackets around it indicates optional repetition of the preceding

element or grouped elements.


For example, if you can specify one or more columns for an option and must separate

them by commas, this is expressed as: <column_name> [,…].

An example of grouped elements that don’t need a comma separator looks

like this: { <column_name> <data_type> } […]

1.2.2 Syntax Term Representations

Throughout this reference guide, each syntax term is defined using one of the following representations:

<model> ::= “Model_Name”

<version_dim> ::= [d/Version_Dimension_Name]

<account_dim> ::= [d/Account_Dimension_Name]

<date_dim> ::= [d/Date_Dimension_Name]

<generic_dim> ::= [d/Generic_Dimension_Name]

<organization_dim> ::= [d/Organization_Dimension_Name]

<dimension> ::= [<account_dim> | <date_dim> | <generic_dim> | <organization_dim>]

<property> ::= [p/Property_ID]

<hierarchy> ::= [h/Hierarchy_ID]

<parent_member> ::= “Parent_Member_ID”

<parent _members> ::= <parent_member> [, …]

<leaf_member> ::= “Leaf_Member_ID”

<leaf_members> ::= <leaf_member> [, …]

<date_hierarchy> ::= <date_dim>.<hierarchy>

<date_member> ::= <leaf_member> of <date_dim>

<property_value> ::= “Value” of <property>

<#variablemember> ::= #VariableMember

<@integer> ::= @INTEGER

<@float> ::= @FLOAT

<number_variable>::= {<@integer> | <@float>}

<parameter_any_leaf> ::= %Parameter% (Type: Member; Cardinality: Any; Hierarchy Level: Leaf)

< parameter_single_leaf > ::= %Parameter% (Type: Member; Cardinality: Single; Hierarchy Level: Leaf)

5
< parameter_single_any > ::= %Parameter% (Type: Member; Cardinality: Single; Hierarchy Level: Any)

<parameter_number> ::= %Parameter% (Type: Number)

<operator> ::= + | - | / | *

<comparator> : := != | =

<comparator_all> ::= < | > | = | <= | >= | !=

<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

<sign> ::= + | -

<period> ::= .

<unsigned_integer> ::= <digit>[...]

<signed_integer> ::= [<sign>] <unsigned_integer>

<unsigned_numeric> ::= <unsigned_integer> [ <period> [ <unsigned_integer> ] ] | <period> <unsigned_integer>

<signed_numeric> ::= [<sign>] <unsigned_numeric>

<numeric> ::= <signed_numeric> | <signed_integer>

<fixed_date> ::= YYYY-MM-DD | YYYY-MM | YYYY-Q | YYYY | YYYYMMDD | YYYYMM | YYYYQ | YYYY/MM/DD |
YYYY/MM | YYYY/Q | YYYY.MM.DD | YYYY.MM | YYYY.Q

6
2. Configuration Functions

Configuration functions let you set global configuration options that are applied to the entire advanced
formulas step.

2.1 CONFIG.TIME_HIERARCHY
Sets the time hierarchy of the script.
Syntax
CONFIG.TIME_HIERARCHY = {CALENDARYEAR | FISCALYEAR}

2.2 CONFIG.GENERATE_UNBOOKED_DATA
This option specifies how to deal with unbooked source data. Unbooked data refers to cells with empty
values.
Turn it on to treat unbooked source cells as 0 value. In this case, unbooked cells can be included in data to
copy.
If turned off (the default setting), only booked data will be copied. Unbooked data in the calculation results
will be ignored and won’t change target values.
Syntax
CONFIG.GENERATE_UNBOOKED_DATA = {ON | OFF}

2.3 CONFIG.FLIPPING_SIGN_ACCORDING_ACCTYPE
If turned on, all calculations consider the sign value of debit accounts (expense or asset) or credit accounts
(income or liability and equity).
Syntax
CONFIG.FLIPPING_SIGN_ACCORDING_ACCTYP = {ON | OFF}

2.4 CONFIG.HIERARCHY
Sets the hierarchy of one or more dimensions in the script.
Syntax
CONFIG.HIERARCHY [<model>=]{<dimension>.<hierarchy>} [,…]

2.5 CONFIG.TIME_ZONE_OFFSET
Sets the time zone offset in hours from Coordinated Universal Time (UTC), so you can use functions like
TODAY() accurately for a specific country.
Syntax
CONFIG.TIME_ZONE_OFFSET = {-23 | -22 | … | +22 | +23}

2.6 CONFIG.HIERARCHY.INCLUDE_MEMBERS_NOT_IN_HIERARCHY
Expands the calculation scope to include members that aren’t in the hierarchy for one or more dimensions.
Syntax
CONFIG.HIERARCHY.INCLUDE_MEMBERS_NOT_IN_HIERARCHY
[<model>=]{<dimension>.<hierarchy>} [,…]

7
3. Member scope definition

3.1 MEMBERSET
Defines the overall dimension member scope.
Syntax
MEMBERSET {<dimension_member>|<dimension_property>|<date_scope>}
Syntax Elements
<dimension_member> ::={<dimension> = <member_id>}
<member_id> ::= { (<leaf_member>[,…])|<dimension >.<property> |(<parameter_list>[,…])|(<basemember>[,…]) }
<parameter_list> ::= <parameter_any_leaf> | < parameter_single_leaf >
<basemember> ::= BASEMEMBER()
<dimension_property> :: = {<dimension>.<property> = <property_value>[,…]}
<time_scope> ::= {<date_dim> = <date_member_id> TO <date_member_id>}
<date_member_id> ::= [ <date_member> | <version_dim>.<property> | PERIOD () | NEXT() | PREVIOUS () ]
Examples
• MEMBERSET [d/Flow] = ("F_TEMP", "F_NONE")

• MEMBERSET [d/Currency] = [d/Organization].[p/Currency]

• MEMBERSET [d/Entity].[p/Region] = "ASIA"

• MEMBERSET [d/Account] = BASEMEMBER([d/Account] , %Input_Account% )

• MEMBERSET [d/Date] = "202001" to "202012"

• MEMBERSET[d/Date] = [d/Version].[p/Beginning] to [d/Version].[p/Ending]

• MEMBERSET[d/Date] = [d/Version].[p/Beginning] to PERIOD( TODAY() )

8
4. Variables

A variable is a named data object that refers to a number or virtual dimension member.

4.1 VARIABLEMEMBER
Defines a virtual member to store intermediate calculated values for a specific dimension. It’s stored
independently and cannot be added to a dimension like a real dimension member.
Syntax
VARIABLEMEMBER #VariableMemberName OF <dimension>
Examples
• VariableMember #SumOfSales OF [d/Account]

4.2 INTEGER
Defines a variable for your script with an integer data type. The default value is 0.
Syntax
INTEGER @IntegerVariableName
Examples
• INTEGER @iCOUNT

FOREACH [d/Product]
@iCOUNT = @iCOUNT + 1
ENDFOR

4.3 FLOAT
Defines a variable for your script with a floating-point data type. The default value is 0.0.
Syntax
FLOAT @FloatVariableName
Examples
• FLOAT @SumOfValue

@SumofValue = RESULTLOOKUP([d/ACCOUNT] = "Profit")

9
5. Write Back Functions

These functions let you write back or delete records where a specified condition is met.

5.1 DATA ()
Writes values and creates records within the target scope that you set.
Syntax
DATA([<dimension>=<member_id>,…],[<date_dim>=<date_scope_function>])
Syntax Elements
<member_id> ::= { <leaf_member> | <#variablemember> | < parameter_single_leaf > | <dimension>
| <dimension>.<property> | ELIMMEMBER() }
<date_scope_function> ::= [ PERIOD () | NEXT() | PREVIOUS () | FIRST () | PREYEARLAST () ]
Examples
• DATA([d/Account]="90011001")) =
RESULTLOOKUP([d/Account]="11101000") + RESULTLOOKUP([d/Account]="22000000")

• VARIABLEMEMBER #Account OF [d/Account]


DATA([d/Account]= #Account) = RESULTLOOKUP([d/Account]= "90011001") * 1.2

• DATA([d/Account]= %InputAccount%) = RESULTLOOKUP([d/Account]= "90011001") * 1.2

• DATA([d/Entity]=[d/CostCenter].[p/Region]) = RESULTLOOKUP([d/Entity]=”HQ_Europe” )

• DATA([d/Date]=PREVIOUS()) = RESULTLOOKUP()
DATA([d/Date=NEXT(12)) = RESULTLOOKUP()

• DATA([d/Entity])=ELIMMEMBER([d/Entity],"CHINA","KOREA",[d/Entity].[p/Elimination]="Y")) =RESULTLOOKU
P()

5.2 DATA.APPEND ()
Appends values and creates records within the target scope that you set.
Syntax
DATA.APPEND [<dimension>=<member_id>,…],[<date_dim>=<date_scope_function>])
Syntax Elements
<member_id> ::= { <leaf_member> | <#variablemember> | < parameter_single_leaf > | <dimension>
| <dimension>.<property> | ELIMMEMBER() }
<date_scope_function> ::= [ PERIOD () | NEXT() | PREVIOUS () | FIRST () | PREYEARLAST () ]
Examples
• DATA.APPEND ([d/Account]="90011001")) =
RESULTLOOKUP([d/Account]="11101000") + RESULTLOOKUP([d/Account]="22000000")

• VARIABLEMEMBER #Account OF [d/Account]


DATA.APPEND ([d/Account]= #Account) = RESULTLOOKUP([d/Account]= "90011001") * 1.2

• DATA.APPEND ([d/Account]= %InputAccount%) = RESULTLOOKUP([d/Account]= "90011001") * 1.2

• DATA.APPEND ([d/Entity]=[d/CostCenter].[p/Region]) = RESULTLOOKUP([d/Entity]=”HQ_Europe” )

• DATA.APPEND([d/Entity=ELIMMEMBER([d/ENTITY],"CHINA","KOREA",[d/ENTITY].[p/Elimination]="Y")) =RESU
LTLOOKUP()

5.3 DELETE
Deletes records in the target scope that you set.
Syntax

10
DELETE (<dimension>=<member_id>[,…],[<date_dim>=<date_scope_function>])

Syntax Elements
<member_id> ::= <leaf_member> | <dimension >.<property> | < parameter_single_leaf >
<date_scope_function> ::= [ PERIOD () | NEXT() | PREVIOUS () | FIRST () | PREYEARLAST () ]

Examples
• DELETE([d/Account]="Disposal" , [d/FLOW]="OPEN" )

• DELETE([d/Entity]="Singapore", [d/INTCO]=[d/Entity].[p/IntCo])

11
6. CALCULATION EXPRESSIONS

This section describes the calculation expressions offered in Advanced Formulas.

6.1 RESULTLOOKUP ()
Returns a dataset corresponding to the specified dimension filters.
Syntax
RESULTLOOKUP ([<dimension_all>=<member_id>,…],[<date_dim>=<date_scope_function>])
Syntax Elements
<dimension_all> ::= <dimension> | <version_dim>
<member_id> ::= { <leaf_member> | <#variablemember> | < parameter_single_leaf > | <dimension>
| <dimension_all>.<property> | ELIMMEMBER() }
<date_scope_function> ::= [ PERIOD () | NEXT() | PREVIOUS () | FIRST () | PREYEARLAST () ]
Examples
• DATA([d/Account]="90011001")) =
RESULTLOOKUP([d/Account]="11101000") + RESULTLOOKUP([d/Account]="22000000")

• VARIABLEMEMBER #Account OF [d/Account]


DATA([d/Account]="90011001") = RESULTLOOKUP([d/Account]=#Account) * 1.2

• DATA([d/Account]="90011001") = RESULTLOOKUP([d/Account]= %InputAccount%) * 1.2

• DATA([d/Entity]=”HQ_Europe” ) = RESULTLOOKUP([d/Entity]=[d/CostCenter].[p/Region])

• DATA() = RESULTLOOKUP([d/Date]=PREVIOUS())
DATA() = RESULTLOOKUP([d/Date]=NEXT(12))

6.2 LINK
Copies or reads data from a model other than the data action’s default model.
The LINK function only reads data, and can’t be defined in DATA functions to write data. You can only write
data to the default model.
Syntax
LINK (<linked_model>,<linked_version>,<linked_member>{,…},[<shared_member>,…])
Syntax elements
<linked_model> ::= Linked <model>
<linked_version> ::= {<version_dim>=<leaf_member>}
<linked_member> ::= <linked_dimension>= {<leaf_member> | <dimension>.<property>}
<linked_dimension> ::= Local <dimension> of linked model
<shared_member> ::= <shared_dimension>= {<leaf_member> | <dimension>.<property> | <date_scope_function>}
<shared_dimension> ::= Public <dimension> that exists in both the linked and default model.
<date_scope_function> ::= [ PERIOD () | NEXT() | PREVIOUS () | FIRST () | PREYEARLAST () ]

Examples
• DATA() =
LINK ( [BusinessPlanning_AF] , [d/Version]="Plan01" , [d/Account]=[d/ChartOfAccount].[p/SUB_Acc]
, [d/Entity] = "REG0001" , [d/CostCenter]="GENERAL"
, [d/Product]="PRD0002" , [d/Customer]="CUST0001" , [d/Flow]="F_OPE" )

6.3 ATTRIBUTE
Returns the values of a dimension property. The values must be numbers.
Syntax
ATTRIBUTE (<dimension>.<property>,[<member_id>])
Syntax Elements
<member_id> ::= <leaf_member> | <parent_member> | <parameter_single_leaf>
Examples

12
• @Volume = ATTRIBUTE ([d/Product].[p/Volume], "Prod_001")

• MEMBERSET [d/Product] = ("Prod_002", "Prod_003")

DATA() = RESULTLOOKUP() * ATTRIBUTE([d/Product].[p/Volume])

6.4 CARRYFORWARD
Carries forward account balances over multiple time periods, optionally adding or subtracting values in each
time period.
Syntax
CARRYFORWARD(<dimension>,<opening_member>,<closing_member>,<closing_calc>,[<targ
et_member>])
Syntax Elements
<opening_member> ::= <leaf_member> for Opening balance
<closing_member> ::= <leaf_member> for Closing balance
<closing_calc> ::= <leaf_member> [ [ <operator> <leaf_member> ] …]
<target_member> ::= <leaf_member> for target
Examples
MEMBERSET [d/Date] = "202001" to "202012"

DATA() = CARRYFORWARD ( [d/FLOW], "OPENING", "ENDING", "OPENING" + "CHANGE" + "OTHERS" )

6.5 Time Functions

6.5.1 DAY ()
Takes a date and returns the day number, such as 31.
Syntax
DAY(<date>)
Syntax Elements
<date> ::= <fixed_date> | <date_parameter_single_leaf> | <date_dim> | <dimension>.<date_property> | TODAY()
<date_parameter_single_leaf> ::= <parameter_single_leaf> of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() * DAY([d/Employee].[p/EndDate])

• DATA() = RESULTLOOKUP([d/ACCOUNT]= "Salary" ) * DAY("2019-03-15")

• IF DAY(%DateMember%) = 31 THEN
DATA()=RESULTLOOKUP() + DAY([d/Date])
ENDIF

6.5.2 MONTH ()
Takes a date and returns the month number, such as 12.
Syntax
MONTH(<date>)
Syntax Elements
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() * MONTH([d/Employee].[p/EndDate])

• DATA() = RESULTLOOKUP([d/ACCOUNT]= "Salary" ) * MONTH("2019-03-15")

13
• IF MONTH(%DateMember%) = 1 THEN
DATA()=RESULTLOOKUP() + MONTH([d/Date])
ENDIF

• IF MONTH([d/Employee].[p/StartDate]) = 3 THEN
DATA() = RESULTLOOKUP()
ENDIF

6.5.3 YEAR ()
Takes a date and returns the year, such as 2019.
Syntax
YEAR(<date>)
Syntax Elements
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() + YEAR([d/Employee].[p/EndDate])

• DATA() = RESULTLOOKUP([d/ACCOUNT]= "Salary" ) * YEAR([d/Date])

• IF YEAR (%DateMember%) = 2020 THEN


DATA()=RESULTLOOKUP() + MONTH([d/Date])
ENDIF

• IF YEAR ([d/Employee].[p/Startdate]) = 2021 THEN


DATA() = RESULTLOOKUP()
ENDIF

6.5.4 DAYSINMONTH ()
Returns the number of days in a calendar month taken from a specific date, date dimension, or dimension
property. The number returned is an integer.
Syntax
DAYSINMONTH(<date>)
Syntax Elements
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() * DAYSINMONTH ([d/Employee].[p/EndDate])

• DATA() = RESULTLOOKUP([d/ACCOUNT]= "Salary" ) * DAYSINMONTH ([d/Date])

• IF DAYSINMONTH (%DateMember%) = 30 THEN


DATA()=RESULTLOOKUP() + MONTH([d/Date])
ENDIF

• IF DAYSINMONTH ([d/Employee].[p/ EndDate]) = 30 THEN


DATA() = RESULTLOOKUP() / 30 * DAY([d/Employee].[p/EndDate])
ENDIF

6.5.5 DAYSINYEAR ()
Returns number of days in a calendar year. The year is a 4-digit number taken from a specific date, date
dimension, or dimension property.
Syntax

14
DAYSINYEAR(<date>)
Syntax Elements
<date> ::= <fixed_date> | <date_parameter_single_leaf> | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= <parameter_single_leaf> of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() * DAYSINYEAR ([d/Employee].[p/EndDate])

• DATA() = RESULTLOOKUP([d/Account]= "Salary" ) * DAYSINYEAR ([d/Date])

• IF DAYSINYEAR (%DateMember%) = 365 THEN


DATA()=RESULTLOOKUP() + MONTH([d/Date])
ENDIF

• IF DAYSINYEAR ([d/Employee].[p/EndDate]) = 366 THEN


DATA() = RESULTLOOKUP() * DAYSINMONTH ([d/Employee].[p/EndDate])
/ DAYSINYEAR ([d/Employee].[p/EndDate])
ENDIF

6.5.6 DATERATIO ()
Calculates how many days between the start and end date overlap the given period, and then divides the
overlapping days by the total number of days in the period.
Syntax
DATERATIO(<start_date>,<end_date>,[<date>])
Syntax elements
<start_date> ::= <fixed_date> | <dimension>.<date_property> | TODAY()
<end_date> ::= <fixed_date> | <dimension>.<date_property> | TODAY()
<date> ::= <fixed_date> | <date_parameter_single_leaf> | <date_dim> | <dimension>.<date_property> | TODAY()
<date_parameter_single_leaf> ::= <parameter_single_leaf> of <date_dim>
<date_property> ::= <property> with date format
Examples
• DATA() = RESULTLOOKUP() * DATERATIO ([d/Employee].[p/ StartDate] , [d/Employee].[p/EndDate] , TODAY() )

• DATA([d/Account] = "AnnualSalary") = RESULTLOOKUP([d/Account] = "AnnualSalary") / 12


* DATERATIO ([d/Employee].[p/StartDate] , [d/Employee].[p/EndDate], [d/Date] )

• IF DATERATIO ([d/Employee].[p/StartDate] , [d/Employee].[p/EndDate], [d/Date] ) > 0.5 THEN


DATA()=RESULTLOOKUP()
ENDIF

6.5.7 DATEDIFF ()
Returns the period of time between two dates, in a specified time granularity. The granularity can be day,
month, quarter, or year.
Syntax
DATEDIFF(<date_1>,<date_2>,<time_granularity>,[<calculation_mode>])
Syntax Elements
<date_1> ::= <fixed_date> | <date_parameter_single_leaf> | <date_dim> | <dimension>.<date_property> | TODAY()
<date_2> ::= <fixed_date> | <date_parameter_single_leaf> | <date_dim> | <dimension>.<date_property> | TODAY()
<date_parameter_single_leaf> ::= <parameter_single_leaf> of <date_dim>
<date_property> ::= <property> with date format
<time_granularity> ::= “DAY” | “MONTH” | “QUARTER” | “YEAR”
<calculation_mode> ::= “CalendarDiff” | “Floor” | “Ceiling”
Examples
• DATA() = RESULTLOOKUP() * DATEDIFF ([d/Employee].[p/ StartDate] , [d/Employee].[p/EndDate] , TODAY() )

• DATA([d/Account] = "AnnualSalary") = RESULTLOOKUP([d/Account] = "AnnualSalary") / 365

15
* DATEDIFF ([d/Employee].[p/StartDate] , [d/Employee].[p/EndDate], [d/Date] )

• IF DATEDIFF([d/Date], [d/Bond].[p/StartDate], "MONTH", "CalendarDiff") = 0 THEN


DATA( ) = RESULTLOOKUP( ) * ATTRIBUTE([d/Bond].[p/Interest_Rate])
ENDIF

6.6 Mathematical Functions

6.6.1 ABS
Returns the absolute value of a number.
Syntax
ABS(<number>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = ABS(@Float)

• DATA() = ABS(RESULTLOOKUP()) * ABS(%Number%)

• DATA() = RESULTLOOKUP() + ABS(ATTRIBUTE([d/INTCO].[p/Number]))

6.6.2 LOG
Returns the natural logarithm.
Syntax
LOG(<number>)
Syntax elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = LOG(@Float)

• DATA() = LOG(ABS(RESULTLOOKUP())) * LOG(ABS(%Number%))

• DATA() = RESULTLOOKUP() + LOG(ABS(ATTRIBUTE([d/IntCo].[p/Number])))

6.6.3 LOG10
Returns the base 10 logarithm.
Syntax
LOG10(<number>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()

16
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = LOG10( ABS(@Float) )

• DATA() = LOG10( ABS (RESULTLOOKUP() ) ) * LOG10( ABS (%Number%) )

• DATA() = RESULTLOOKUP() + LOG10( ABS (ATTRIBUTE([d/INTCO].[p/Number]) ) )

6.6.4 MOD
Returns the remainder after the first number is divided by the second number. The result has the same sign
the second number.
Syntax
MOD(<number>,<number>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = MOD ( @Float , @int )

• DATA() = MOD ( RESULTLOOKUP() , %Number% )

• DATA() = MOD ( @Float , RESULTLOOKUP() )

• DATA() = RESULTLOOKUP() + MOD ( ATTRIBUTE([d/IntCo].[p/Number]) , 10 )

6.6.5 POWER
Returns the first number raised to the power of the second number.
Syntax
POWER
(<number>,<number>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = POWER ( @Float , @int )

• DATA() = POWER ( RESULTLOOKUP() , %Number% )

• DATA() = POWER ( @Float , RESULTLOOKUP() )

• DATA() = RESULTLOOKUP() + POWER ( ATTRIBUTE([d/IntCo].[p/Number]) , 10 )

6.6.6 SQRT
Returns the square root of a number.
Syntax
SQRT(<number>)

17
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
Examples
• DATA() = SQRT (ABS(@Float))

• DATA() = SQRT (ABS(RESULTLOOKUP())) * SQRT (ABS(%Number%))

• DATA() = RESULTLOOKUP() + SQRT (ABS(ATTRIBUTE([d/INTCO].[p/Number])))

6.7 Conversion Functions

6.7.1 ROUND
Rounds the first number to a specified number of decimal places.
Syntax
ROUND(<number>,<integer>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
<integer> ::= <signed_integer> | <@integer> | <parameter_number>
Examples
• DATA() = ROUND ( @Float , @int )

• DATA() = ROUND ( %Number% , -2 )

• DATA() = ROUND ( RESULTLOOKUP() , %Number% )

• DATA() = RESULTLOOKUP() + ROUND( ATTRIBUTE([d/IntCo].[p/Number]), 2 )

6.7.2 FLOOR

With the specified number of decimal places, returns the largest possible number that is not greater than the
entered number. The integer sets the number of decimal places.
Syntax
FLOOR(<number>,<integer>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
<integer> ::= <signed_integer> | <@integer> | <parameter_number>
Examples
• DATA() = FLOOR ( RESULTLOOKUP())

• DATA() = FLOOR ( @Float , @int )

18
• DATA() = FLOOR ( %Number% , -2 )

• DATA() = FLOOR ( RESULTLOOKUP() , %Number% )

• DATA() = RESULTLOOKUP() + FLOOR ( ATTRIBUTE([d/INTCO].[p/Number]), 2 )

6.7.3 CEIL
With the specified number of decimal places, returns the smallest possible number that is not less than the
entered number. The integer sets the number of decimal places.
Syntax
CEIL(<number>,<integer>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
<integer> ::= <signed_integer> | <@integer> | <parameter_number>

Examples
• DATA() = CEIL ( RESULTLOOKUP())

• DATA() = CEIL ( @Float , @int )

• DATA() = CEIL ( %Number% , -2 )

• DATA() = CEIL ( RESULTLOOKUP() , %Number% )

• DATA() = RESULTLOOKUP() + CEIL ( ATTRIBUTE([d/IntCo].[p/Number]), 2 )

6.7.4 TRUNC
Returns a numeric value truncated to a specific number of decimal places set by the integer.
Syntax
TRUNC(<number>,<integer>)
Syntax Elements
<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE()
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <time_calculation> | <mathematical_functions> | <conversion_functions>
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()
<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
<integer> ::= <signed_integer> | <@integer> | <parameter_number>
Examples
• DATA() = TRUNC ( @Float , @int )

• DATA() = TRUNC ( %Number% , -2 )

• DATA() = TRUNC ( RESULTLOOKUP() , %Number% )

• DATA() = RESULTLOOKUP() + TRUNC ( ATTRIBUTE([d/IntCo].[p/Number]), 2 )

19
7. Master Data Functions
These functions return dimension members based on certain conditions.

7.1 ELIMMEMBER
Returns the names of the elimination members below the first common parent of two companies that did
inter-company trading.

In the case above, the inter-company transaction data between Korea and China will be eliminated after copy
ing to Elimination Asia, which is the elimination member under their common parent, Asia.
For the inter-company transaction data between Korea and France, the value will be copied to Elimination W
orld under their first common parent, World.
Using ELIMMEMBER, you can get Elimination Asia as the elimination member of Korea and China and
Elimination World as the elimination member of Korea and France.
Syntax
ELIMMEMBER(<elim_dimension_hierarchy>,<elim_member1>,<elim_member2>,[<elim_prope
rty>=”Y”])
Syntax Elements
<elim_dimension_hierarchy> ::= <elim_dimension>|<elim_dimension>.<hierarchy>
<elim_dimension> ::= <dimension>
<elim_member1> ::= <leaf_member> of <elim_dimension>|<elim_dimension>
<elim_member2> ::= <leaf_member> of <elim_dimension>|<elim_dimension>
<elim_property>::=<elim_dimension>.<property>

**If <elim_property> is omitted, <elim_dimension>.[p/Elimination]= "Y” is assumed.


Examples
• DATA([d/Entity] = ELIMMEMBER( [d/Entity] . [h/Mgmt] , "Japan" , "France" , [d/Entity].[p/Elimination]="Y" ))
= RESULTLOOKUP()

• DATA([d/Entity] = ELIMMEMBER( [d/Entity] , "GreatBritain" , "France" , [d/Entity].[p/Elimination]="Y" ))


= RESULTLOOKUP()

• DATA([d/Entity] = ELIMMEMBER( [d/Entity] , [d/Entity] , [d/INTCO].[p/Entity] , [d/Entity].[p/Elimination]="Y" )


)
= RESULTLOOKUP()

20
• DATA([d/Entity] = ELIMMEMBER( [d/Entity] , [d/Entity].[p/IntCo] , [d/IntCo] ))
= RESULTLOOKUP()

7.2 BASEMEMBER
Sets the scope to all base members of a specific parent member. Base members refer to the leaf members
without any child members in a given hierarchy.
Syntax
BASEMEMBER(<dimension_hierarchy>,<parent_member_id>)
Syntax Elements
<dimension_hierarchy> ::= {<dimension> | <dimension>.<hierarchy>}
<parent_member_id> ::= {<parent_member> | < parameter_single_any > }
Examples
• CONFIG.HIERARCHY = [d/ENTITY].[h/H1]
MEMBERSET [d/ENTITY] = BASEMEMBER([d/ENTITY], "World")

• MEMBERSET [d/ENTITY] = BASEMEMBER([d/ENTITY].[h/H2], "SalesCompany")

• MEMBERSET [d/ENTITY] = BASEMEMBER([d/Account] , %Account_Input% )

7.3 Time selection


These functions return a member of the date dimension matching certain criteria.

7.3.1 PREVIOUS ()
Returns a time period or date that deducts a specified offset value of a certain granularity from the specified
date.
Syntax
PREVIOUS([<offset>],[<time_granularity>],[<date>])
Syntax Elements
<offset> ::= <signed_integer> | <@integer> | <parameter_number>
<time_granularity> ::= “DAY” | “MONTH” | “QUARTER” | “YEAR”
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• MEMBERSET [d/Date] = PREVIOUS (1, "MONTH", [d/Version].[p/StartPeriod]) to [d/Version].[p/EndPeriod]

• DATA ( [d/Date]=PREVIOUS(@Integer) ) = RESULTLOOKUP ()

• DATA () = RESULTLOOKUP ( [d/Date]=PREVIOUS(1, "MONTH", "2020-04-21") )

• DATA ( [d/Date]=PREVIOUS(%ExternalParameter%, "MONTH", "2020-04-21") ) = RESULTLOOKUP ()

• DATA () = RESULTLOOKUP ( [d/Date]=PREVIOUS(2, "QUARTER", %DateMember%) )

• DATA ( [d/Date]=PREVIOUS(3, "MONTH", TODAY() ) ) = RESULTLOOKUP ()

7.3.2 NEXT ()
Returns a time period or date that adds a specified offset value of a certain granularity to the specified date.
Syntax
NEXT([<offset>],[<time_granularity>],[<date>])
Syntax Elements
<offset> ::= <signed_integer> | <@integer> | <parameter_number>

21
<time_granularity> ::= “DAY” | “MONTH” | “QUARTER” | “YEAR”
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• MEMBERSET [d/Date] = NEXT (1, "MONTH", [d/Version].[p/StartPeriod]) to [d/Version].[p/EndPeriod]

• DATA () = RESULTLOOKUP ( [d/Date]= NEXT () )

• DATA ( [d/Date]= NEXT (@Integer) ) = RESULTLOOKUP ()

• DATA () = RESULTLOOKUP ( [d/Date]= NEXT (1, "MONTH", "2020-04-21") )

• DATA ( [d/Date]= NEXT (%ExternalParameter%, "MONTH", "2020-04-21") ) = RESULTLOOKUP ()

• DATA () = RESULTLOOKUP ( [d/Date]= NEXT (2, "QUARTER", %DateMember%) )

• DATA ( [d/Date]= NEXT (3, "MONTH", TODAY() ) ) = RESULTLOOKUP ()

7.3.3 FIRST ()
Returns the first period of the current year.
Syntax
FIRST()
Examples
• DATA ( [d/Date] = FIRST() ) = RESULTLOOKUP()

• DATA () = RESULTLOOKUP( [d/ACCOUNT]= "Volume", [d/Date] = FIRST() )

7.3.4 PREYEARLAST ()
Returns the last period of the previous year.
Syntax
PREYEARLAST()
Examples
• DATA ( [d/Date] = PREYEARLAST () ) = RESULTLOOKUP( )

• DATA () = RESULTLOOKUP( [d/ACCOUNT]= "Volume", [d/Date] = PREYEARLAST () )

7.3.5 PERIOD ()
Converts a date to a time period with the same granularity as the date dimension.
Syntax
PERIOD(<date>)
Syntax Elements
<date> ::= <fixed_date> | < date_parameter_single_leaf > | <date_dim> | <dimension>.<date_property> | TODAY()
< date_parameter_single_leaf > ::= < parameter_single_leaf > of <date_dim>
<date_property> ::= <property> with date format
Examples
• MEMBERSET [d/Date]= PERIOD(TODAY()) TO “202012”

• DATA([d/Date] = PERIOD([d/Employee].[p/StartDate]) = RESULTLOOKUP()

• DATA() = RESULTLOOKUP([d/ACCOUNT]= "Volume", [d/Date] = PERIOD( %DateMember%) )

• IF [d/Date]= PERIOD([d/Employee].[p/EndDate])THEN
DATA()=RESULTLOOKUP( [d/ACCOUNT]= "Salary" )
ENDIF

22
8. Iteration

8.1 FOREACH
Repeats a group of statements for each combination of dimension members in a specified scope of one or
more dimensions.
Syntax
FOREACH <dimension>[,…]
<Statement>
[…]
ENDFOR
Examples
• FOREACH [d/Date]
Data () = ResultLookup ( [d/DATE]=PREVIOUS(1) ) * 1.1
ENDFOR

8.2 FOREACH.BOOKED
Repeats a group of statements for each booked combination of dimension members in a specified scope of
one or more dimensions. Compared to FOREACH, this function can improve performance by avoiding
unnecessary repetitions on unbooked members.
Syntax
FOREACH.BOOKED <dimension>[,…]
<Statement>
[…]
ENDFOR

23
9. Condition

9.1 IF ELSEIF
Conditionally runs a group of statements, depending on the value of an expression.
Syntax
IF <condition> THEN
<Statement>
[…]
[ELSEIF <condition>]
<Statement>
[…]
ENDIF
Syntax Elements
<condition> ::= <comparison1> | <comparison2> | <null_check1> | <null_check1>

<comparison1> ::= { <member_comparison> | <property_comparison> | <time_comparison> } [<and>…]


<comparison2> ::= <number> [ [<operator> <number>]… ] <comparator_all>
<number_time> [ [<operator> <number_time>]… ]
<null_check1> ::= <dimension>.<property> <comparator><"">
<null_check2> ::= { RESULTLOOKUP() | LINK() } <comparator> <null>

<member_comparison> ::={<dimension> <comparator> <member_id>}


<member_id> ::= { (<leaf_member> [,…]) | <dimension_property> | (<parameter_list> [,…]) | (<basemember> [,…]) }
<dimension_property> ::= <dimension > |<dimension >.<property>
<parameters> ::= <parameter_any_leaf> | < parameter_single_leaf >
<basemember> ::= BASEMEMBER()
<property_comparison> :: = {<dimension>.<property> <comparator> <property_value>[,…]}
<time_comparison> ::= {<date_dim> <comparator> <date_member_id>}
<date_member_id> ::= [ <date_member> | <dimension>.<property> ]

<number> ::= <numeric_value> | <numeric_functions> | RESULTLOOKUP() | ATTRIBUTE() | LINK()


<number_time> ::= <numeric_value> | <numeric_time_functions>| | RESULTLOOKUP() | ATTRIBUTE() | LINK(
<numeric_value> ::= <numeric> | <number_variable> | <parameter_number>
<numeric_functions> ::= <mathematical_functions> | <conversion_functions>
<numeric_time_functions> ::= <mathematical_functions> | <conversion_functions> | <time_calculation>

<mathematical_function> ::= ABS() | LOG() | LOG10() | MOD() | POWER() | SQRT()


<conversion_function> ::= ROUND() | FLOOR() | CEIL() | TRUNC()
<time_calculation> ::= DAY() | MONTH() | YEAR() | DAYSINMONTH() | DAYSINYEAR() | DATERATIO() | DATEDIFF()
Examples
• IF RESULTLOOKUP([d/Account]="PRICE") > 0 THEN
//Statement…
ENDIF

• IF ABS(@NUM) > 0 OR @Total = 20 THEN


//Statement...
ENDIF

• IF [d/Account].[p/Acctype]=("AST", "LEQ") THEN


//Statement...
ENDIF

• IF [d/Account] ="REVENUE" AND [d/Product] ="16GB" THEN


//Statement…
ELSEIF [d/Product] = "32GB" THEN
//Statement...

24
ENDIF

• IF [d/Flow] = (BASEMEMBER([d/Flow].[h/Hierarchy] ,"F_TOTAL" )) THEN


//Statement...
ENDIF

25
10. Miscellaneous

10.1 TODAY ()
Returns current system’s date in Coordinated Universal Time (UTC) in the format YYYYMMDD.
Syntax
TODAY()
Examples
• MEMBERSET [d/Date]= “202001” TO PERIOD(TODAY())

• DATA([d/Date] = PERIOD( TODAY() )) = RESULTLOOKUP()

• DATA() = RESULTLOOKUP([d/Account]= "Volume", [d/Date] = PERIOD( TODAY() ) )

• IF [d/Date]=PERIOD(TODAY() ) THEN
DATA()=RESULTLOOKUP( [d/Account]= "Volume" )
ENDIF

26
www.sap.com/contactsap

© 2020 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary softwar e components of other software vendors.
National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliate d companies’ strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from e xpectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/copyright for additional trademark information and notices.

27

You might also like