Show TOC

CURRENT MEMBER VariablesLocate this document in the navigation structure

With a CURRENT MEMBER variable, you can define filters for structure elements of a query; these filters have limits that depend on the value of a characteristic in the drilldown.

This allows you to define queries to cover the following business scenarios for example:

  1. Comparison with previous month: The query shows the value of a key figure per month together with the value of the key figure in the previous month. These values can be used in formulas, for example to calculate the change or percentage change in comparison with the previous month. You can define the value from the previous month in Query Designer by defining a restricted key figure and restricting the month with the CURRENT MEMBER variable with an offset of -1.
  2. YTD (year to date) analyses: The query shows the aggregated value of a key figure per month starting from the value for January through to the month in the row. You can define this key figure in Query Designer by defining a restricted key figure and restricting the month by a range with January of the year in question as the lower limit and the CURRENT MEMBER variable as the upper limit.
  3. Rolling window: The query shows the aggregated value of a key figure over the last three months starting with month in the row. You can define this key figure in Query Designer by defining a restricted key figure and restricting the month by a range with the CURRENT MEMBER variable with offset -2 as the lower limit and the CURRENT MEMBER variable as the upper limit.
  4. Rolling average: Rather than showing the value aggregated using standard aggregation (as in example 3), this should show the average value over the last three months. Firstly, define a restricted key figure in example 3. Then define a formula equal to this key figure and set exception aggregation "Average“ for the month.
Note Whereas time characteristic Month is used here, you can take any other time characteristic.

CURRENT MEMBER variables can only be defined for characteristics, which relate to a calendar. These include 0CALDAY, 0CALMONTH, 0FISCPER and other similar characteristics, as well as characteristics that reference these. This function is not possible for other characteristics, especially pseudo time characteristics such as 0CALMONTH2 or 0FISCPER3.

The corresponding variables for the content time characteristics are delivered with the technical content in SAP Business Warehouse. The technidal name of the variables is made up of the prefix 0CURMEM_ and the technical name of the time characteristic, 0CURMEM_CALDAY or 0CURMEM_CALMONTH for example. You can also create a variable of your own.

Note

Note regarding system performance: the system reads the data from the database, in the granularity of the characteristic of the CURRENT MEMBER. In addition, different database access types may be required for various restrictions with CURRENT MEMBER variables.

How it Works

The CURRENT MEMBER variable can be used in restricted key figures as either the lower limit or the upper limit in combination with an offset. However, only one restriction with a CURRENT MEMBER variable - with a maximum of one interval - is allowed per restricted key figure.

In a colum (row) with a key figure restricted in this way, a different filter affects every cell displayed in the query result:

  • In cells where the characteristic of the CURRENT MEMBER variable has been clearly defined, the CURRENT MEMBER variable is replaced with this value. As this occurs for both the lower limit and the upper limit, a range selection normally results.
  • In cellls where the characteristic of the CURRENT MEMBER variables has not been clearly defined (in the result rows for example), the other filters on time characteristics are converted to ranges for the characteristic with the CURRENT MEMBER variable. The CURRENT MEMBER variable in the lower limit is replaced by the upper limit of the range, and the CURRENT MEMBER variable in the upper limit is replaced by the lower limit of the range.
    Note For the cells that filters on the time characteristics cannot be converted in ranges of the characteristic with the CURRENT MEMBER for, the system returns the value none exists.
  • If there are any other restrictions for the characteristic in the structure element with the CURRENT MEMBER variable, these are intersected with the restrictions by the CURRENT MEMBER variable. This way of handling deviates from the rule that different restrictions on a characteristic should be linked with a logical OR and a union set should be built accordingly.
  • In structure elements with CURRENT MEMBER variables, the system converts global filters into filters for the CURRENT MEMBER characteristic.
    Note

    If a query is restricted to the month interval January 2013 to December 2013, then a column, which is restricted to CM-1, would still show the value for December 2012 as the value for January 2013.

Example

The value for every cell in the example below can be reproduced by a query, in which the characteristic with the CURRENT MEMBER variable for month contains exactly the filter entered in the cell. The filter in the query definition is Year = 2013. The CURRENT MEMBER variable is abbreviated as CM in the following table. CM-1 is the variable with offset -1.

Table 1: Example query for using CURRENT MEMBER variables; the global filter is included.
Month CM -1 01.2013 - CM (CM-2) - CM (CM-2) - CM

[02.2013, 12.2013]

01.2013 12.2012 01.2013-1.2013 11.2012-01.2013 empty set
02.2013 01.2013 01.2013-2.2013 12.2012-02.2013 02.2013-02.2013
... ... ... ... ...
Result 12.2012-11.2013 01.2013-12.2013 11.2012-12.2013 02.2013-12.2013
Dependency of Query Display on Characteristic Property Access Type for Result Value
If the CURRENT MEMBER variable in an interval is used in a structure element, the cells are only displayed in certain circumstances:
  • A cell is displayed if there is a posting for the key figure of the time characteristic.
  • A cell is displayed if the option has been specified that all values - including unposted values - are displayed for the time characteristic in the drilldown of the query. In the Query Designer, this is specified using the property Access Type for Result Values with the value Master Data.
Example

Only the following values are posted in an InfoProvider:

  • 01.2013 with the value 10

  • 06.2013 with the value 15

In this case, the query displays:

Table 2: Query with restriction of the cells on posted values
Month Key Figure

01.2013 - CM

01.2013 10
06.2013 15
Result 25
If the property Access Type for Result Values is selected for the characteristic Month with the value master data, the query displays the following image:
Table 3: Query displaying all cells
Month Key Figure

01.2013 - CM

01.2013 10
02.2013 10
... ...
05.2013 10
06.2013 25
... ...
12.2013 25
Result 25
Constraints
  • A CURRENT MEMBER variable can only be defined for time characteristics.
  • This function can only be used if the time characteristics of the selected InfoProvider have the same semantics and are thus dependent on each other.
  • Time characteristics that cannot be expressed as an interval of the characteristic of the CURRENT MEMBER variables are not permitted in the global filter or as a free characteristic.
    Note

    If the CURRENT-MEMBER variable relates to 0CALMONTH (for example), then 0CALYEAR and 0CALQUARTER (for example) are permitted as free characteristics but 0CALDAY, 0CALWEEK or 0FISCPER are not permitted.

  • A CURRENT MEMBER variable can only be used in selections of a structure element or in a restricted key figure, but NOT in the filter for the query.
  • Each structure element can have just one selection with a CURRENT MEMBER variable or with a range made up of CURRENT MEMBER variables. This filter cannot be defined as "excluding“ (only INCLUDING is allowed).
  • Due to technical reasons, an upper or a lower limit is needed in the global filter of a query for the characteristic of the CURRENT MEMBER variables, if the variable is used as an upper or a lower limit. If this limit is not set, the system displays a warning and the value non exists is shown in the relevant cells.
  • Manual planning is not possible on structure elements with a CURRENT MEMBER variable.