Show TOC

Example Query for Using a CURRENT MEMBER VariableLocate this document in the navigation structure

SAP DemoContent for Features (transaction RSFC), which is delivered with SAP Business Warehouse, contains query 0D_FC_AE_CURNTMEM_Q002. This illustrates a variety of ways in which a CURRENT MEMBER variable can be used.

The screenshot below shows query 0D_FC_AE_CURNTMEM_Q002:

0D_FC_AE_CURNTMEM_Q002

The query structure contains the following characteristics:
  • Calendar Year, restricted to calendar year 2007
  • Calendar Year/Month

The query contains the following key figures:

  • Net Sales This column shows the Net Sales figure per month.

    Result: Total of all sales figures posted in 2007.

  • Net Sales - 1: This column shows the Net Sales figure from the previous month.

    Row 01.2007 contains the sales figure from December 2006.

    Result: The total of all sales posted from December 2006 to November 2007.

  • 02.2007 to CURRENT MEMBER (0CALMONTH): This is a year-to-date analysis performed using the CURRENT MEMBER variable 0CURMEM_0CALMONTH. The system calculates the cumulative sales from Februar 2007 up to and including the current month.

    Result: Total of all sales figures posted in 2007 from February onwards. As no sales were posted in Januar, this is the total of all sales for the entire year.

  • CURRENT MEMBER (0CALMONTH) to 12.2007: The system calculates the sales figure from the current month to December 2007.

    Result: Total of all sales figures posted in 2007.

  • (CURRENT MEMBER (0CALMONTH) - 2) to CURRENT MEMBER (0CALMONTH): This is a rolling screen. The system calculates the cumulative sales figure for the last three months.
    Note You can also use this key figure in formulas, for example to calculate the share of the sales figure from a given month in a given quarter.

    Result: Total sales figure from 2006 to December 2007.

  • AVG ((CURRENT MEMBER (0CALMONTH) - 2) to CURRENT MEMBER (0CALMONTH)): This key figure is defined using formula exception aggregation AVG for reference characteristic 0CALMONTH. The system calculates the average sales from the last three months.

    Result: Total sales figure from November 2006 to December 2007 dvided by the number of values posted. If sales were only posted in 10 of the 14 months in question, the division is made by 10.