0% found this document useful (0 votes)
17 views

IBP Functions

The document outlines various IBP (Integrated Business Planning) functions used for data aggregation and calculations in planning models, including IBP_CAGGR, IBP_PERIODSHIFT, and IBP_DYNAMIC_RAGGR. Each function is described with its syntax, parameters, and practical business applications, such as cumulative aggregation for sales data and period shifting for sales comparisons. Additionally, it includes examples and Excel views to illustrate how these functions can be implemented effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

IBP Functions

The document outlines various IBP (Integrated Business Planning) functions used for data aggregation and calculations in planning models, including IBP_CAGGR, IBP_PERIODSHIFT, and IBP_DYNAMIC_RAGGR. Each function is described with its syntax, parameters, and practical business applications, such as cumulative aggregation for sales data and period shifting for sales comparisons. Additionally, it includes examples and Excel views to illustrate how these functions can be implemented effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 99

Learning and Knowledge Management

Planning Model Advance


Training
IBP FUNCTIONS

Copyright © 2020 Accenture. All rights reserved.


List of IBP Functions
1. IBP_CAGGR 13. COUNT
2. IBP_PERIODSHIFT 14. NOT
3. IBP_DYNAMIC_RAGGR 15. STDDEV
4. IBP_LAST_VALUE 16. CEIL
5. IBP_LPA 17. FLOOR
6. IBP_RAGGR 18. ROUND
7. CASE 19. ROUNDDOWN
8. IBP_COVERAGE 20. LTRIM
9. IBP_CALENDAR 21. RTRIM
10. IBP_CURRENT_VALUE 22. EXP
11. IBP_GENERATE_MISSING_TP 23. SQRT
12. IBP_WEIGHTEDAVG 24. LOG

Copyright © 2020 Accenture. All rights reserved. 2


1. IBP_CAGGR
Cumulative aggregation is a chain of successive aggregations across periods, calculated in a single step. It however imposes
filter blocks in the calculation graph of a key figure, which might increase the runtime of queries.

Syntax: KF1@PLANLEVEL = IBP_CAGGR(1st,2nd,3rd,4th,5th)

• 1st Parameter (Mandatory): It is always the input key figure at the input planning level. The value must be surrounded
by double quotation marks.
• 2nd Parameter (Mandatory): It is the aggregation mode
Possible values: SUM, AVG, MIN, MAX, COUNT, and STDDEV.
• 3rd Parameter (Mandatory): It is the direction of cumulative aggregation
Possible values: FORWARD (year-to-date calc)/ BACKWARD (year-to-go calc).
• 4th Parameter (Mandatory): It is the horizon for calculation
Possible values: PAST, PASTCURRENT, PASTCURRENTFUTURE, CURRENT, CURRENTFUTURE, and FUTURE;
If only one key figure is used for cumulative aggregation, regardless of the horizon, the PASTCURRENTFUTURE value is
used for this parameter.
• 5th Parameter (Optional): Time profile level at which the cumulative aggregation should restart.
Possible values: Positive integers that correspond to the time profile levels of the time profile assigned to the planning
area. Quotation marks mustn't surround this parameter value.
Copyright © 2020 Accenture. All rights reserved. 3
1. IBP_CAGGR
Business Cases:
Used for typical cross-period calculations such as: Projected stock, year-to-date and year-to-go calculations, or cumulative
average.
Configuration: Year to date sales qty

Copyright © 2020 Accenture. All rights reserved. 4


1. IBP_CAGGR
Excel View:

The ‘YTD Sales qty’ KF value in Feb 2022 will be the summation of ‘Actual Sales after returns’ KF values for the months Jan
2022 and Feb 2022, and so on.

Copyright © 2020 Accenture. All rights reserved. 5


2. IBP_PERIODSHIFT
Instead of using complicated attribute transformations, period shift functionality can be used to shift key figure values by
time periods, in a single step. It however imposes filter blocks in the calculation graph of a key figure, which might increase
the runtime of queries

Syntax: KF1@PLANLEVEL = IBP_PERIODSHIFT(1st,2nd,3rd)


• 1st Parameter (Mandatory): It is always the input key figure at the input planning level. Period shift is based on the root
time attribute of the planning level of the input key figure; The value must be surrounded by double quotation marks.
• 2nd Parameter (Mandatory): It is the number of periods by which you want to shift the input key figure. It can take the
following values: Constant/ Attribute (which may or may not be a time profile attribute)/KF; If an attribute or key figure
is used to specify the number of periods, the value must be surrounded by double quotation marks.
• 3rd Parameter (Optional): If a key figure is shifted by a time profile attribute or a key figure, it might end up with multiple
values in some of the time buckets. In such cases, this parameter will help define the aggregation logic of individual
source values; Possible values are MIN, MAX, SUM and AVG.
This value must be surrounded by two pairs of single quotation marks.

Copyright © 2020 Accenture. All rights reserved. 6


2. IBP_PERIODSHIFT
Business Cases:
You can use this functionality to determine the last year same month Sales/ Revenue. It can also be used to offset you
receipts by lead time.
Configuration: Last year same month Sales qty

Copyright © 2020 Accenture. All rights reserved. 7


2. IBP_PERIODSHIFT
Excel View:

The ‘Actual sales after returns’ KF value for Jan 2021 will be period shifted by 12 time buckets, here month, and will be
populated in Jan 2022 as KF value in the KF ‘LYSM Sales qty’

Copyright © 2020 Accenture. All rights reserved. 8


3. IBP_DYNAMIC_RAGGR
Dynamic rolling aggregation is used to aggregate key figures across several time periods for a time window specified by key
figures, attributes, or constants.
The dynamic rolling aggregation (IBP_DYNAMIC_RAGGR) function gives the possibility to define the calculation horizon
with attributes and key figures which are in addition to constants. This provides more flexibility in the planning models but
requires more configuration and maintenance efforts.
The IBP_DYNAMIC_RAGGR function has five mandatory parameters and one optional parameter.
1st: input key figure at input planning level (mandatory)
2nd: aggregation type (mandatory)
3rd: start of dynamic rolling aggregation (mandatory)
4th: duration of dynamic rolling aggregation (mandatory)
5th: calculation horizon (mandatory)
6th: restart of dynamic rolling aggregation (optional)

Copyright © 2020 Accenture. All rights reserved. 9


3. IBP_DYNAMIC_RAGGR
Syntax: KF1@WKPRODLOCCUST = IBP_DYNAMIC_RAGGR(1st,2nd,3rd,4th,5th,6th)
Configuration:

Copyright © 2020 Accenture. All rights reserved. 10


3. IBP_DYNAMIC_RAGGR
Excel view:

In case of TW 36, offset is 0 and hence start of aggregation is TW 36. As duration is 2 weeks, stat forecast is aggregated till
TW 37.
In case of TW 39a, offset is -1 and hence start of aggregation is TW 38. As duration is 2 weeks, stat forecast is aggregated
till TW 39a.

Copyright © 2020 Accenture. All rights reserved. 11


4. IBP_LAST_VALUE
Use the last value calculation to search for and return the last not NULL value of the input key figure (in case its
actual value is NULL), starting from the previous period.
To use the last value calculation, use the IBP_LAST_VALUE function in the calculation definition of key figures in
the Planning Areas app:
Syntax: IBP_LAST_VALUE (<KEY FIGURE@PLANLEVEL, <MAX_NUMBER_OF_PERIODS>)
Configuration:
Parameters of Last value calculation:
First Parameter: The first parameter of the IBP_LAST_VALUE function is always the input key figure at the input planning
level.

Copyright © 2020 Accenture. All rights reserved. 12


4. IBP_LAST_VALUE
Excel View:
If the parameter is not defined, the IBP_LAST_VALUE function searches in the complete time horizon of the planning view
in the past and returns the last not NULL value.

Second Parameter
2nd parameter: maximum number of time periods (optional)
 Value of input key figure is not NULL
The IBP_LAST_VALUE function returns the actual value of the input key figure.
 Value of input key figure is NULL

Copyright © 2020 Accenture. All rights reserved. 13


4. IBP_LAST_VALUE
The IBP_LAST_VALUE function searches for the last not NULL value of the input key figure and returns it. If there is no not
NULL value in the specified time window, the function returns the actual value (NULL) of the input key figure.
If the second parameter is defined, it specifies the maximum number of time periods in the past, starting from the
previous period, that are included in the search. It uses the root time period of the input planning level. For example, if
the value of the parameter is 2, the IBP_LAST_VALUE function searches only in the last 2 periods before the actual period
and returns the last not NULL value from that time range.
The value must be a positive integer and must not be surrounded by quotation marks.

Copyright © 2020 Accenture. All rights reserved. 14


4. IBP_LAST_VALUE
Excel View:

Copyright © 2020 Accenture. All rights reserved. 15


5. IBP_LPA
Use last period aggregation to display the key figure value for the last period in a given time period (for example, the last
month of a quarter or the last month of a year). We can use the IBP_LPA function to configure last period aggregation in
one step.

Syntax: IBP_LPA("INPUTKFID@INPUTPLEVEL")

Configuration:
Last period aggregation must have exactly one input parameter, which is the key figure to be aggregated. This key figure
must be the same as the input of the calculation definition. The input key figure can be stored and calculated as well. You
cannot use IBP_LPA function without an input key figure as no defualt value is provided. The result of last period
aggregation is written to the output key figure.
Last period aggregation cannot be used in a REQUEST level calculation.

Copyright © 2020 Accenture. All rights reserved. 16


5. IBP_LPA
Static Aggregation
In case of static last period aggregation, aggregation is defined for a specific time profile level. To calculate static
aggregation, use the IBP_LPA function and 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 of the root time profile level in the input planning level.

In this example, the input key figure shows the inventory level of a product on a daily basis.
Copyright © 2020 Accenture. All rights reserved. 17
5. IBP_LPA
Excel View:

Then, on Technical Week level, we can calculate the last period Actuals Qty for all time profile levels that are built on
technical week.

Copyright © 2020 Accenture. All rights reserved. 18


6. IBP_RAGGR
 Rolling aggregation can be used to aggregate key figures across several time periods, for a specified time window.
 To use rolling aggregation, use the IBP_RAGGR function in the calculation definition of key figures in the Planning Areas
app.
 Instead of requesting an L script to create such an aggregation, you can use the IBP_RAGGR function to configure
rolling aggregation in one step
 The parameters you define in the calculation definition specify the time window and the aggregation type of the rolling
aggregation function

The IBP _RAGGR function has five mandatory parameters and one optional parameter.
1st: input key figure at input planning level (mandatory)
2nd: aggregation type (mandatory)
3rd: start of rolling aggregation (mandatory)
4th: duration of rolling aggregation (mandatory)
5th: calculation horizon (mandatory)
6th: restart of rolling aggregation (optional)

Copyright © 2020 Accenture. All rights reserved. 19


6. IBP_RAGGR
Syntax: KF1@WKPRODLOCCUST = IBP _RAGGR(1st,2nd,3rd,4th,5th,6th)

Note:
 The value of the 1st parameter must be surrounded by double quotation marks
 The values of the 2nd and 5th parameters must be surrounded by two pairs of single quotation marks. A double
quotation mark instead of two single quotation mark will result in an error during activation

Configuration:

Copyright © 2020 Accenture. All rights reserved. 20


6. IBP_RAGGR
Excel View:

In this example, you can calculate the summary of the statistical forecast for the previous, actual, and upcoming technical
weeks.
In case of TW 40, offset is -1 and hence start of aggregation is TW 39a. As duration is 3 weeks, stat forecast is aggregated
till TW 41.

Copyright © 2020 Accenture. All rights reserved. 21


7. CASE
Syntax: CASE (Argument key figure, Input Value 1, Value key figure 1,…, Default Key Figure)
Configuration:

Copyright © 2020 Accenture. All rights reserved. 22


7. CASE
Scenario 1: When the value of the “Selected Option” key figure is 1, then the “Output Key Figure” returns value of
“Stored KF 1”
Excel View:

Copyright © 2020 Accenture. All rights reserved. 23


7. CASE
Scenario 2: When the value of the “Selected Option” key figure is 2, then the “Output Key Figure” returns value of
“Stored KF 2”
Excel View:

Copyright © 2020 Accenture. All rights reserved. 24


7. CASE
Scenario 3: When the value of the “Selected Option” key figure is 3, then the “Output Key Figure” returns value of
“Stored KF 3”
Excel View:

Copyright © 2020 Accenture. All rights reserved. 25


8. IBP_COVERAGE
This function provides coverage of a Key Figure value. The function can be useful in calculating projected stock.

Syntax: : IBP_COVERAGE ("KF1", "KF2", 1, ''NEXTBUCKET'', ''USEZEROSTOCK'', ''PASTCURRENTFUTURE'') where,


KF1 (Mandatory)  The first parameter of the IBP_COVERAGE function is the amount that must be covered by the second
parameter. It is either an input key figure at the input planning level or a positive number.
KF2 (Mandatory)  The second parameter of the IBP_COVERAGE function must cover the amount of the first parameter. It
is an input key figure at the input planning level.
3rd Parameter (Mandatory) The third parameter of the IBP_COVERAGE function is an input key figure at the input
planning level or a positive number.

When calculating coverage, values of the third parameter are aggregated with a SUM for all time periods where the second
parameter covers the amount of the first parameter. If the second parameter covers only a fraction of the amount of the
first parameter for a given time period, the same fraction of the third parameter in the given time period is included in the
aggregation.

Copyright © 2020 Accenture. All rights reserved. 26


8. IBP_COVERAGE
4th Parameter (Start of Coverage) (Mandatory)  This allows the planner to set the starting period of the coverage. This
can be any one of the following values:
 NEXTBUCKET: If the value of the second key figure refers to the amount at the end of the current bucket, calculate
coverage starting from the next bucket using the NEXTBUCKET parameter.
 CURRENTBUCKET: If the value of the second key figure refers to the amount at the beginning of the current bucket,
calculate coverage starting from the current bucket using the CURRENTBUCKET parameter.
5th Parameter (Zero Coverage) (Mandatory)  Planner can define whether the zero value of the second parameter can
cover the zero value of the first parameter in your coverage calculation.
Possible values are: USEZEROSTOCK, IGNOREZEROSTOCK
6th Parameter (Calculation Horizon) (Mandatory)  The sixth parameter defines the calculation horizon. If separate key
figures are used to calculate the past, present, and future values, this parameter filters the values; thus, coverage will only
be calculated for the specified time horizon.
Possible values are PAST, PASTCURRENT, PASTCURRENTFUTURE, CURRENT, CURRENTFUTURE, and FUTURE.

Copyright © 2020 Accenture. All rights reserved. 27


8. IBP_COVERAGE
7th Parameter (Infinite Coverage) (Optional)  It notifies the planner that the value of the second parameter for a time
period is larger than the sum of the values of the first key figure in all the subsequent periods in the planning horizon. It
must be an integer, possibly a high enough number (for example, 999), to indicate that there is missing amount of the first
parameter or excessive amount of the second parameter. If the parameter is not defined and the value of the second
parameter for a time period is larger than the sum of the values of the first key figure, the sum of the values of the third
parameter for the remaining future time periods is displayed as the coverage.
8th Parameter (Optional) (Number of time periods): The eighth parameter is optional, and planner can only use it if it was
defined in the infinite coverage parameter as well. It can be used to define and thus limit the time window (by specifying
the number of time periods) across which coverage is calculated for a given projected stock value.

Copyright © 2020 Accenture. All rights reserved. 28


8. IBP_COVERAGE
Scenario 1: Calculation of the projected stock based on the demand and days of supply using the coverage function.

Syntax :ZPROJSTOCKCOVERAGE@CALWKPRODLOC = IBP_COVERAGE


("ZWORKDAYSWEEK@CALWKPRODLOC","ZDAYSOFSUPPLY@CALWKPRODLOC","ADJUSTEDDEMAND@CALWKPRODLOC",
''CURRENTBUCKET'',''USEZEROSTOCK'', ''CURRENTFUTURE‘’)

Copyright © 2020 Accenture. All rights reserved. 29


8. IBP_COVERAGE
Explanation: In this scenario, the IBP_COVERAGE function is used to estimate the Projected stock as per the days of
supply covered. In W39 2022, we can see that the planner needs to cover the 5 days of demand, that means the demand
of the current week and 1 day worth of demand from the next week. The direction of coverage is ‘CURRENTFUTURE’ which
means the system will consider the demand from 39th Week onwards and the future weeks. Hence the projected stock
becomes:
179 (Demand for 39th week) + 213/5 (Demand for 1 day of the 40th week) = 221.6

This calculation will also consider the weeks having zero demand. For instance, the projected stock in the 44 th week needs
to cover 10 days of demand which will cover the entirety of 44 th and the 45th week, but the 45th week has zero demand.
Hence the projected stock is 201 which is the demand of 44 th week.

Copyright © 2020 Accenture. All rights reserved. 30


8. IBP_COVERAGE
Scenario 2: Calculation of the period of coverage using the coverage function.

Syntax: ZPROJCOVERAGEINDAYS@WKPRODLOC =
IBP_COVERAGE("ADJUSTEDDEMAND@WKPRODLOC","INVENTORYCORRECTION@WKPRODLOC",1,''NEXTBUCKET'',''IGNORE
ZEROSTOCK'',''CURRENTFUTURE‘’)

Explanation: In this case, the coverage function is used to calculate the number of weeks the inventory can cover the
demand. This calculation ignores the time buckets where there is zero demand. For instance, in TW 44a, the inventory
(220) skips the current week and covers the entire demand for next week (TW 44b) and partial demand of TW 45.

Copyright © 2020 Accenture. All rights reserved. 31


Learning and Knowledge Management

Other
IBP FUNCTIONS

Copyright © 2020 Accenture. All rights reserved.


9. IBP_CALENDAR
We can use this Calendar function to calculate the number of working and non-working days by taking Planning Calendar
as the input.

Syntax: IBP_CALENDAR (<KEY FIGURE@PLANLEVEL, <CALENDAR ATTRIBUTE>)

Parameters of the Calendar (IBP_CALENDAR) Function: The IBP_CALENDAR function has two mandatory parameters:
• 1st parameter: input key figure at input planning level: The first parameter of the IBP_CALENDAR function is always
the input key figure at the input planning level, for example, DEMAND@DAYPRODLOC. It must be a read-only key figure.
The value must be surrounded by double quotation marks.
• 2nd parameter: calendar attribute: The second attribute of the IBP_CALENDAR function is a calendar attribute. It must
be available at the planning level of the input key figure and must be assigned to a master data type.
It must be uploaded with values (calendar IDs) that are imported from SAP ERP and define working and non-working days.
The value must be surrounded by double quotation marks.

NOTE: The IBP_CALENDAR function can be nested in other calculations.


Copyright © 2020 Accenture. All rights reserved. 33
9. IBP_CALENDAR
Configuration:
Create a new Calendar Attribute (here we have created ZCALID as calendar attribute) in the Attribute-Model Configurations
App

Copyright © 2020 Accenture. All rights reserved. 34


9. IBP_CALENDAR
Assign the calendar attribute to Location Master data type in Master data Types App

Copyright © 2020 Accenture. All rights reserved. 35


9. IBP_CALENDAR
Assign the attribute to the Planning Area as well

Copyright © 2020 Accenture. All rights reserved. 36


9. IBP_CALENDAR
KF Configuration:
We have created a KF to calculate workdays which uses IBP_CALENDAR () function.

Copyright © 2020 Accenture. All rights reserved. 37


9. IBP_CALENDAR
MDT view:
In Location MDT, For the attribute ZCALID, we have provided the Calendar ID that is relevant for the location being used
and Save the data.

NOTE: We have used the same ID, which is in the PLANNING CALENDARS App. Here we have used ’01’ i.e., Germany
(Standard)
Copyright © 2020 Accenture. All rights reserved. 38
9. IBP_CALENDAR
Excel View:
In the below Planning view, number 1 denotes workday while 0 denotes a non-working day. Please note this should be in
alignment to the planning calendar of Germany as we used ‘01’as ID.

Copyright © 2020 Accenture. All rights reserved. 39


9. IBP_CALENDAR
Scenario 1: This function can be used to multiply with another Key Figure to zero out the data in the non-working days
Configuration:

Excel View:

Copyright © 2020 Accenture. All rights reserved. 40


9. IBP_CALENDAR
NOTE: Missing Inputs
The input key figure must have data for all time periods and planning objects, as the IBP_CALENDAR function does not
provide default values. The calendar function does not generate missing time periods and key figure data in case the
uploaded data is missing. The input key figure must have data uploaded for all time periods.
There are two cases of missing inputs: NULL value and empty value.
1. NULL Value
If the value of the input key figure is NULL, the result of the IBP_CALENDAR function will be NULL as well. You can default
the NULL value to 0 by adding another calculation if it is justified by your modeling requirements.
2. Empty Value
If a time period for a planning object combination is missing, that time period is skipped. The calendar function is not
calculated for the missing time period.

Copyright © 2020 Accenture. All rights reserved. 41


10. IBP_CURRENT_VALUE
 We use the IBP_CURRENT VALUE function to retrieve the Value from Current Bucket and Populate in the Complete
Planning Horizon.
 Since the output of the current value function is returned in a time-independent key figure, we should join the output
key figure with a time-dependent key figure to be able to extend the current value to the entire planning horizon.
 This also helps when we edit the current value of the input key figure, it will be reflected not only in the current time
period but in all time periods in the planning horizon as well.

NOTE:
 Prior to IBP_CURRENT_VALUE function being introduced; We had to perform custom calculations to take the current
period value and bring Time Dependent to Time Independent. With this new IBP_CURRENT_VALUE function, this
configuration can be avoided.

Syntax: IBP_CURRENT_VALUE (<KEY FIGURE@PLANLEVEL>)

Copyright © 2020 Accenture. All rights reserved. 42


10. IBP_CURRENT_VALUE
Business Case: Typical business use cases of the IBP_CURRENT_VALUE function includes the following:
Minimal lot sizes, Incremental lot sizes and Lead times
For example, the planner changes the lead time for the current day as the transportation time has been increased for
some reason and they want to use the changed value for the future time periods as well.
Scenario 1: Current Value to All Time Period
Configuration:
By using new key figure tab in web UI, we should create one new time independent key figure (In our case we selected
TLEAD TIME as an input Key figure, so our output time independent key figure named as ZTLEADTIMECVINDE)

Copyright © 2020 Accenture. All rights reserved. 43


10. IBP_CURRENT_VALUE
Now we need to join the time independent output key figure with time dependent key figure, by creating a new key figure
ZTLEADTIMECV

Copyright © 2020 Accenture. All rights reserved. 44


10. IBP_CURRENT_VALUE
Scenario 2: Current Value to Future
Configuration:
Similarly, if we want to override the values of the output key figure with the current value only in the future, we can easily
do so by adding the following calculation

Copyright © 2020 Accenture. All rights reserved. 45


10. IBP_CURRENT_VALUE
Excel View:

TW20 – Current week

CURRENT VALUE APPLIES TO DIFFERENT TIME GRANULARITY:


 By using the current value function, we can transfer the time independent output to different time granularity.

Copyright © 2020 Accenture. All rights reserved. 46


10. IBP_CURRENT_VALUE
Scenario 3: Different Time Granularity
Configuration:
In similar way, we should configure the time independent key figure by using current value function in our case we used
TLEADTIME as an input key figure for this scenario too.

Copyright © 2020 Accenture. All rights reserved. 47


10. IBP_CURRENT_VALUE
After that we need to join the time independent with the time dependent one by using the calculations to get the values in
different time granularity.

Excel View:

Copyright © 2020 Accenture. All rights reserved. 48


10. IBP_CURRENT_VALUE
In the above planning view, we maintained 5 as a Transportation Lead Time for the current month, MAY 2022

The above planning view shows by using the current value function, whatever the value in current month it is populated in
all weeks
NOTE:
 We cannot use the IBP_CURRENT_VALUE function without an input key figure as no default value is provided.
 If the current value of input key figure is Zero or NULL or Empty, the output of current value function will be same as
input key figure.

Copyright © 2020 Accenture. All rights reserved. 49


11. IBP_GENERATE_MISSING_TP
This function is used to generate missing time buckets for the calculation horizon defined by the parameters of the
function.
Using the generate missing time periods function, you can generate time periods for the calculation horizon defined by the
second and third parameters of the function. The input key figure values are kept intact, the generated time periods have a
default NULL value. Missing time periods are generated runtime; no data is stored in the database. The generated
combinations are only kept until the key figures that use the output key figure as direct or indirect input are calculated.
The IBP_GENERATE_MISSING_TP function only affects the time dimension. It does not generate combinations in other
dimensions like product, location, or customer.

Copyright © 2020 Accenture. All rights reserved. 50


11. IBP_GENERATE_MISSING_TP
Syntax:
KF1@PLANLEVEL = IBP_GENERATE_MISSING_TP(<KF1@PLANLEVEL>, <START OF CALCULATION HORIZON>, <END OF
CALCULATION HORIZON>)
Configuration:

Copyright © 2020 Accenture. All rights reserved. 51


11. IBP_GENERATE_MISSING_TP
Excel View:
We generate missing time periods for the 21-Sep to 23-Sep. The current month is 22-Sep. We have the following time
periods and data available for the input key figure at the base planning level:

We use the IBP_GENERATE_MISSING_TP function to generate the missing time periods. As a result, the following data set
is generated. The existing input key figure values stay the same, and the missing time periods are generated with a default
NULL value for the calculation horizon.

Copyright © 2020 Accenture. All rights reserved. 52


12. IBP_WEIGHTEDAVG
 As the name suggests this function is used to weighted average for business cases like calculating price
 Instead of using several complex calculations, use the IBP_WEIGHTEDAVG function to calculate weighted average for a
key figure in one step
 To calculate weighted average, use the IBP_WEIGHTEDAVG function in the calculation definition of key figures in the
Planning Areas app

The IBP_WEIGHTEDAVG function has three mandatory parameters:


1) 1st parameter: input key figure at input planning level
The sum of the first parameter multiplied by the second parameter is the numerator of the calculation
2) 2nd parameter: input key figure at the input planning level or attribute
The second parameter of the function is the denominator of the calculation. In case a calculated numerator is used in the
function, the value of the second parameter is the denominator and the weight as well.
3) 3rd parameter: type of numerator
The third parameter of the IBP_WEIGHTEDAVG function defines whether the numerator is stored or calculated.

Copyright © 2020 Accenture. All rights reserved. 53


12. IBP_WEIGHTEDAVG
Possible values:
 CALCULATEDNUMERATOR
The numerator is calculated; it is the sum of the first parameter multiplied by the second parameter.
Example: WEIGHTEDPRICE = SUM(STOREDPRICE*ACTUALSQTY) / SUM(ACTUALSQTY)
 STOREDNUMERATOR
The numerator is not calculated; it is simply the sum of the first parameter. In this case, the numerator's value already
includes a multiplication by the weight.
Example: WEIGHTEDPRICE = SUM(STOREDREV) / SUM(ACTUALSQTY)
Note: The value must be surrounded by two pairs of single quotation marks. A double quotation mark instead of two
single quotation mark will result in an error during activation

Syntax:
KF1@PLANLEVEL = IBP_WEIGHTEDAVG(KF1@PLANLEVEL, KF2@PLANLEVEL or ATTRIBUTE, TYPE OF NUMERATOR)

Copyright © 2020 Accenture. All rights reserved. 54


12. IBP_WEIGHTEDAVG
Scenario 1: Weighted Average with Calculated Numerator
Configuration:

Copyright © 2020 Accenture. All rights reserved. 55


12. IBP_WEIGHTEDAVG
Excel View:
We want to calculate price at product location combination as per the stored price and qty defined at planning level prod-
loc-cust. In case of this example, we have stored price defined at two customers for product FG126 and location 3710.

For the week T40 at Location 3710, weighted price is calculated as follows: (90*100 + 110*200) / (90+110) = 155

Copyright © 2020 Accenture. All rights reserved. 56


12. IBP_WEIGHTEDAVG
Scenario 2: Weighted Average with Stored Numerator
Configuration:

Copyright © 2020 Accenture. All rights reserved. 57


12. IBP_WEIGHTEDAVG
Excel View:
We want to calculate price at product location combination as per the stored price and qty defined at planning level prod-
loc-cust. In case of this example, we have stored price defined at two customers for product FG126 and location 3710.

For the week T40 at Location 3710, weighted price is calculated as follows: (15517 + 15622) / (90+110) = 156

Copyright © 2020 Accenture. All rights reserved. 58


13. COUNT
Syntax: COUNTKF@REQUEST = COUNT(COUNTKF@BASEPLANNINGLEVEL)
Configuration:

Copyright © 2020 Accenture. All rights reserved. 59


13. COUNT
Excel View:
Count checks the count of planning object for a given time period. At base planning level if data exists for a time period,
then at count aggregation will provide value 1 else 0.
Base Planning Level:

Aggregated Level:

Copyright © 2020 Accenture. All rights reserved. 60


14. NOT
Syntax: IF (NOT (KF1@PLANLEVEL= KF2@PLANLEVEL),1,0)
Business Cases: If the planner needs to return the opposite of a value for the Input Key figure, then they can use the NOT
function for the desired key figure.

Configuration:

Copyright © 2020 Accenture. All rights reserved. 61


14. NOT
Excel View: If Not (Actuals Qty=Actuals Qty Adj.), then “Not Actuals Qty Adj.” returns "Not Actuals Qty Adj " if Actuals Qty
KF has any value other than "Actuals Qty Adj. "

Copyright © 2020 Accenture. All rights reserved. 62


15. STDDEV
This function is used to calculate standard deviation for the given key figure.

Syntax: STDDEV (KF@PLANLEVEL)


Business Cases: If the planner needs to calculate Standard Deviation for the Input Key figure, then they can use the
STDDEV function for the desired key figure.
Configuration:

Copyright © 2020 Accenture. All rights reserved. 63


15. STDDEV
Scenario 1: When the value of the input key figure is stored on a weekly level and we calculate standard deviation on a
weekly level in the REQUEST calculation, the result will always be 0.
Excel View:

Copyright © 2020 Accenture. All rights reserved. 64


15. STDDEV
Scenario 2: We have selected monthly level and kept both the location and product dimension. In this case, the value
of the ACTUALQTY key figure is aggregated and standard deviation is calculated.
Excel View:

Scenario 3: We have aggregated the ACTUALQTY key figure to product level and calculated standard deviation.
Excel View:

Copyright © 2020 Accenture. All rights reserved. 65


16. CEIL
CEIL function returns an integer that is just greater than a certain rational value. It is used in situations where exact integer
values are required which is just greater than or equal to the given value.
For example, ceil value of 3.138 is 4.
Syntax: KF1@PERPRODLOC = CEIL("KF@PERPRODLOC")
Business Cases: If the business needs exact integer values of the source KF that is just greater than or equal to the given
values, then they must use the CEIL function for the desired key figure.
Configuration:

Copyright © 2020 Accenture. All rights reserved. 66


16. CEIL
Excel View:

Copyright © 2020 Accenture. All rights reserved. 67


17. FLOOR
FLOOR function returns an integer that is just less than a certain rational value. It is used in situations where exact integer
values are required which is just less than or equal to the given value.
For example, floor value of 3.138 is 3.
Syntax: KF1@PERPRODLOC = FLOOR("KF@PERPRODLOC")
Business Cases: If the business needs exact integer values of the source KF that is just less than or equal to the given
values, then they must use the FLOOR function for the desired key figure.
Configuration:

Copyright © 2020 Accenture. All rights reserved. 68


17. FLOOR
Excel View:

Copyright © 2020 Accenture. All rights reserved. 69


18. ROUND
Round function rounds the number to a specific number of digits to the right or left of the decimal place.
Syntax: KF1@PERPRODLOCSRC = ROUND ("KF@PERPRODLOCSRC", INTEGER)
Business Cases: If the business needs to round off the source KF to a specific value to left or right of the decimal place,
have to use the Round function by maintain the integer to get a desired decimal places.
Scenarios: There are some scenarios based on integer value,
Scenario1
 Using Integer value is 0,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 70


18. ROUND
Excel View:

In the above figure, we can see the KF ZActual Quantity round down to the value having without/ Zero decimal places in
KF Actuals Quantity Rounddown.

Copyright © 2020 Accenture. All rights reserved. 71


18. ROUND
Scenario2
 If the Integer value is 1,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 72


18. ROUND
Excel View:

In the above figure, we can see the KF ZActual Quantity round down to the value having 1 decimal place in KF Actuals
Quantity Rounddown.

Copyright © 2020 Accenture. All rights reserved. 73


18. ROUND
Scenario3
 If the integer value is -1,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 74


18. ROUND
Excel View:

In the above figure, we can see the KF ZActual Quantity rounds down by 1 decimal places to the left of decimal point in
KF Actuals Quantity Round

Copyright © 2020 Accenture. All rights reserved. 75


19. ROUNDDOWN
Rounddown function rounds down the number to left or right of the decimal place. It behaves like Round function, except
it rounds down the value.

Syntax: KF1@PERPRODLOCSRC = ROUNDDOWN ("KF@PERPRODLOCSRC", INTEGER)

Business Case:
If the business needs to round down the value to the specific value left or right to the decimal place, have to use the
Rounddown function by maintain the integer to get a desired decimal place.

Scenarios:
There are some scenarios based on integer value,

Copyright © 2020 Accenture. All rights reserved. 76


19. ROUNDDOWN
There are some scenarios based on integer value,
Scenario1
 Using Integer value is 0,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 77


19. ROUNDDOWN
Excel view:

In the above figure, we can see the KF ZActual Quantity round down to the value having without/ Zero decimal places in
KF Actuals Quantity Rounddown.

Copyright © 2020 Accenture. All rights reserved. 78


19. ROUNDDOWN
Scenario 2
 If the Integer value is 1,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 79


19. ROUNDDOWN
Excel view:

In the above figure, we can see the KF ZActual Quantity round down to the value having 1 decimal place in KF Actuals
Quantity Rounddown.

Copyright © 2020 Accenture. All rights reserved. 80


19. ROUNDDOWN
Scenario 3
 If the integer value is -1,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 81


19. ROUNDDOWN
Excel view:

In the above figure, we can see the KF ZActual Quantity rounds down by 1 decimal places to the left of decimal point in KF
Actuals Quantity Round

Copyright © 2020 Accenture. All rights reserved. 82


20. LTRIM
Removes a whitespace prefix from a string. The Whitespace characters may be specified in an optional argument. This
function also used if there is string present instead of Whitespaces. In that case it removes the String characters from the
left.

Syntax: LTRIM (Attribute ID, String)


Business Cases: If a Planner wants to populate some data for any specific series of products or for any specific product
group (headphones, earplug etc.), he can use LTRIM function to remove any code from prefix and populate the data.
For example- If they want to bring the data for product (HEADPHONES) then they can use LTRIM function to trim code
present in prefix and check to populate data only for that specific product group.

Scenarios:

Copyright © 2020 Accenture. All rights reserved. 83


20. LTRIM
Scenario1
 If string is used,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 84


20. LTRIM
Excel View:

In the above figure, we can see the function will trim BRND from attribute Brand ID and will return the remaining string.
As per the condition if brand is BRND300, it will populate Dependent demand value in ZVLTRIM KF.

Copyright © 2020 Accenture. All rights reserved. 85


20. LTRIM
Scenario2
 If whitespaces are used,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 86


20. LTRIM
MDT Setup:

Excel View:

LTRIM function will remove the whitespace from left side, will return IBP-300 and according to KF calculation will
populate Independent Demand in ZVWLTRIM KF, if the condition proves to be valid.

Copyright © 2020 Accenture. All rights reserved. 87


21. RTRIM
Removes trailing whitespace from a string. The Whitespace characters may be specified in an optional argument. This
function operates on raw bytes of the UTF8-string and has no knowledge of multi byte codes (you may not specify multi
byte whitespace characters). This function also used if there is string present instead of Whitespaces. In that case it
removes the String characters from the right.

Syntax: RTRIM (Attribute ID, String)

Business Cases: Supposedly if a Planner wants to populate some data for any specific products belonging to any specific
series, then, he can use RTRIM function to remove the suffix present in the form of any code and populate the data. For
example- If they want to bring the data for product with series IBP, then they can use RTRIM function to trim- Product
Description to validate the series and populate data.

Scenarios:

Copyright © 2020 Accenture. All rights reserved. 88


21. RTRIM
Scenario1
 If string is used,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 89


21. RTRIM
Excel View:

In the above figure, we can see the function will trim 300 from attribute Brand ID and will return the remaining string. As
per the condition if brand is BRND300, it will populate Independent demand value in ZVRTRIM KF.

Copyright © 2020 Accenture. All rights reserved. 90


21. RTRIM
Scenario2
 If whitespaces are used,

Configuration:

Copyright © 2020 Accenture. All rights reserved. 91


21. RTRIM
MDT Setup:

Excel View:

According to the logic, RTRIM function will firstly trim ‘300-MUSIC DOCKS’ from Product Family from the right side. As
there is still a space after Family, RTRIM function will again remove the whitespace, then validating it with String
“Family”. If it matches, then Dependent Demand will be populated else Independent Demand.
Copyright © 2020 Accenture. All rights reserved. 92
22. EXP
EXP function returns the result of the constant e raised to the power of a number. The EXP function has one mandatory
parameter, which is the power that e is raised to. It can be an expression (with a numeric output), a key figure, an integer
type attribute, or a numeric constant.

Syntax: KF@MTHPRODLOC = EXP("SKF@MTHPRODLOC")


Business Cases: If the planner needs to calculate Exponential for the Input Key figure , then they must use the EXP
function for the desired key figure.
Configuration:

Copyright © 2020 Accenture. All rights reserved. 93


22. EXP
Excel View:

Copyright © 2020 Accenture. All rights reserved. 94


23.SQRT
We can use the below given syntax (2 ways of doing it) to calculate the square root of a given value/key figure that we
might use, it can also be used to create a calculation for anything raised to the power of something.

Syntax: 1. Sample configuration for aggregation of standard deviation


Take the sum of the squares; then calculate the square root of the total:
Calculate the squares: Square the values:
HKF1@PL = ZDATAKF@PL ** 2
Calculate the square root of the total:
PROPAGATEDDEMANDSTDEV@REQUEST= HKF1@REQUEST ** 0.5

2. It can be done using a SQRT function-


ZKF1@WKPRODLOC = SQRT("ZDATAKF@WKPRODLOC")

Business Cases: If the business needs to have a KF which would indicate the value as Some power of the source KF then
we can achieve it by this syntax.

Copyright © 2020 Accenture. All rights reserved. 95


23.SQRT
Configuration:
1.

2.

Copyright © 2020 Accenture. All rights reserved. 96


23.SQRT
Excel View:

1.

2.

Copyright © 2020 Accenture. All rights reserved. 97


24. LOG
Returns the natural logarithm of a given number. The LOG function has one mandatory parameter, which is the number to
take the natural logarithm of. It can be an expression (with a numeric output), a key figure, an integer type attribute, or a
numeric constant.

Syntax: KF@MTHPRODLOC = LOG("SKF@MTHPRODLOC")

Business Cases: If the business needs to have a KF which requires a calculation source KF then we can achieve it by this
syntax.

Excel View:

Copyright © 2020 Accenture. All rights reserved. 98


Copyright © 2020 Accenture. All rights reserved. 99

You might also like