Configuring Last Period Aggregation

Objective

After completing this lesson, you will be able to configure last period aggregation

Last Period Aggregation

Last Period Aggregation Overview

There are two types of Last Period Aggregation Calculations:

  1. DYNAMIC AGGREGATION:

    The aggregated key figure can be calculated on any time profile level since the time profile level for which aggregation takes place is defined during runtime. Use this option when the goal is to ensure flexibility at querying key figures at request level. The time aggregation will happen using last period aggregation on the requested time granularity.

    - Make sure that no root time profile level is defined in the output planning level of the aggregation and in any of the calculations built on last period aggregation.

    - Time profile levels must be the same in the input and output planning levels.

    AGGRINVENTORY@PERPRODLOC = IBP_LPA ( "INVENTORY@DAYPRODLOC" ) AGGRINVENTORY@REQUEST = SUM ( "AGGRINVENTORY@PERPRODLOC" )

  2. STATIC AGGREGATION:

    Aggregation can be defined for a specific time profile level. For example, use the last period aggregation function to calculate the aggregated inventory level on a weekly basis, since all the other calculations built on this key figure are defined for technical and calendar weeks. Since both technical week and calendar week are built on day, you can use the static aggregation.

    - Define a root time profile level in the output planning level.

    - The root time profile level in the output planning level must be a possible parent (that is. a broader time period) of the root time profile level in the input planning level.

    AGGRINVENTORY@TWPRODLOC = IBP_LPA ( "INVENTORY@DAYPRODLOC" )

    AGGRINVENTORY@REQUEST = SUM ( "AGGRINVENTORY@TWPRODLOC" )

First Period Aggregation

First period aggregation (IBP_FPA) is used when you want to display the key figure value for the first period in a given time span, for example, the first month of a quarter or the first month of a year.

The typical use case is to show the initial stock value on aggregated levels.

First and last period aggregations are different ways of modeling the same concept (differences can be due to various financial practices adopted by the organization).

To configure first period aggregation in one step, use the IBP_FPA function in the calculation definition of key figures in the Planning Areas app:

IBP_FPA ("INPUTKFID@INPUTPLEVEL").

There are two ways to calculate first period aggregation depending on whether a root time profile level is defined in the output planning level:

Dynamic Aggregation:

Use this option when you want to ensure flexibility at querying key figures at request level. The time aggregation happens on the requested time granularity.

To calculate dynamic aggregation, make sure that no root time profile level is defined on the output planning level of the aggregation and in any of the calculations built on first period aggregation. Additionally, time profile levels must be the same on the input and output planning levels.

This mode of implementation does not imposes a filter block!

Static Aggregation:

Use this option when all the other calculations built on this key figure are defined for a specific time profile level.

To calculate static aggregation, define a root time profile level on the output planning level. The root time profile level on the output planning level must be a possible parent of the root time profile level on the input planning level. Static first period aggregation imposes filter blocks in the calculation graph of a key figure, which might increase the run time of queries.

Demonstration: How to Configure Last Period Aggregation

Configure Last Period Aggregation

Business Example

In your role as a project manager, you need to configure the last period aggregation to get values for an inventory target quantity.

In this exercise we are going to configure the static aggregation using the IBP_LPA function. In our example, to get the value of Inventory Target Quantity for the end of a quarter, we will use the formula to compute the value of Aggregated Inventory Target at the end of the last month of the quarter.

When the values include ##, replace the characters with the number that your instructor has assigned to you.

Task 1: Create Planning Level

Steps

  1. Create a planning level QRTPRODLOC by copying planning level PERPRODLOC. Ensure that Quarterly is the root. Use the following data:

    FieldValueRoot
    NameQRTPRODLOC 
    DescriptionQuarter / Product / Location 
    Time Attributes  
    Quarterly
    Yearly 
    Attributes  
    I##PRODUCT  
    PRDID
    PRDDESCR 
    PRDFAMILY 
    ABCCODE 
    I##LOCATION  
    LOCID
    LOCDESCR 
    1. On the T## screen, choose Planning Levels tab.

    2. Choose New, select lowest time profile level Quarterly and choose OK.

    3. Using the Change Assignment delete the Monthly level and ensure that the Quarterly level is selected as root.

    4. Enter the ID and description.

    5. Select the master data types indicated in the table.

    6. Choose Save.

  2. Create a key figure called AGGREGATEDINVENTORY at the QRTPRODLOC planning level, which will display inventory at the end of the quarter.

    Use the following data.

    Field

    Value

    Key Figure IDAGGREGATEDINVENTORY
    Base Planning LevelQRTPRODLOC
    NameAggregated Inventory
    Calculated

    1. Select your T## planning area and navigate to Key Figures tab at the top.

    2. Choose New.

    3. Enter the Key Figure ID, followed by other values from the table.

    4. Validate the request level calculation that will be generated automatically.

      The pop-up may appear at validation. Choose Proceed Anyway.

  3. Add the following calculation:

    AGGREGATEDINVENTORY @QRTPRODLOC = IBP_LPA("INVENTORYTARGETQTY @MTHPRODLOC")

    1. While in your AGGREGATEDINVENTORY key figure navigate to Add Calculation Definition tab.

    2. Enter the QRTPRODLOC level in the window.

    3. Enter the right side of the equation in the space.

    4. Click on the Inputs and validate that INVENTORYTARGETQTY@MTHPRODLOC is stored.

    5. Validate the calculation

    6. If shown a warning, choose to proceed.

    7. Check the request level calculation and ensure that AGGREGATEDINVENTORY@QRTPRODLOC is calculated.

    8. Click Save.

Task 2: Activate your Planning Area

Steps

  1. Activate your planning area.

    1. Choose Activate → Full Scope with Dependencies.

    2. Refer to the activation logs to ensure that your planning area is activated.

Task 3: Test Your Solution Using Planner Workspace

Steps

  1. Test your solution by creating a Planner Workspace using the following information.

    FieldValue
    Time
    Time PeriodQuarterly
    FromCurrent Quarter
    ToCurrent Quarter + 4
    RollingYes
    Planning Level
    Product ID

    Selected

    Location ID

    Selected

    Key Figures 
    Aggregated Inventory

    Selected

    Inventory Target Qty

    Selected

    Filters
    Product IDx100 Phone
    Location ID101
    1. Choose Planner Workspaces app in the General Planner group.

    2. Open the workspace 300_##.

    3. On the top right, choose Workspace → Design.

    4. Choose Settings on the top right of your existing planning view.

    5. Under the More dialog (three dots), choose Manage Workspace Content.

    6. Select your component and choose Copy.

    7. Name your new planning view as LPA.

    8. Return to the Planner Workspaces app and choose Planning View.

    9. Select the copied content (you might need to refresh the workspace).

    10. Complete the dialog box with the information provided in the table.

    11. To display the planning view, choose Apply.

    12. When you confirm the calculation, choose Workspace → Save on the top right.

Log in to track your progress & complete quizzes