# Current date in key figure expression in IBP

Current date in key figure expression in IBP

How to get current date in the key figure expression in IBP

10|10000 characters needed characters exceeded

Posted on Sep 20, 2019 at 10:48 PM

Hi Parthi,

You can follow the below steps in order to calculate the passed ship Days

1) You can create an attribute as a key figure(KF1) and default it to 1 so that this key figure will have 1 value across the entire horizon.

2) Create another key figure(KF2) in order to determine the number of passed periods

3) Now add the below calculation in order to aggregate the data at the TW Level

ZKF2@WKPRODLOC = SUM( "ZKF2 @DAYPRODLOC" )

4) Add another calculation in order to aggregate the data at MTH Level

ZKF2@MTHPRODLOCCAL = SUM( "ZKF2 @WKPRODLOC" )

For ex on 20th Sept the Passed Ship Days should be 19

Regards

Arif

10|10000 characters needed characters exceeded
• Posted on Sep 18, 2019 at 02:59 PM

Hi Parthi, could you please elaborate what is the use case for Current date for you.

In calculations expression : PERIODIDn is sed : n is the time period level so if you have a time profile with base as Month and then Quarter and year. then PERIODID0 = Month, PERIODID1 = YEAR and PERIODID2 = month. for Current period the expression is \$\$PERIODIDnCU\$\$ . This should help for the required calculations. Please refer to SAP documentation here:

https://help.sap.com/viewer/bf99e931b8d44aafb4e306ec3602cbdd/1908/en-US/78da2d554c95743ce10000000a174cb4.html

Thanks,

Nikunj

10|10000 characters needed characters exceeded
• Posted on Sep 19, 2019 at 01:55 PM

The requirement is to find out the "Daily Average Sales Qty - Month To Date" = Demand History Qty Adjusted / number of “Ship Days” passed up to Current Date

(Excluding current date ie. To day)

The requirement is to find out how many "Ship Days" have passed / Completed in the current month from 1st date of the month to current date (Excluding current date - To day).

How to find the number of "Ship days" passed from the beginning of this month to till yesterday (Not current date).

IF we are in the middle of the month on 19-Sep-2019 and user enters the adjusted Sales qty in "Demand History Qty Adjusted" for Sep-2019 cell in the Planning View then We would like to calculate the "Demand History Qty Adjusted" divided by the number of "Ship days passed up to the current date".

Month to Date calculation.

Experts please suggest on this if you know the solution on similar scenarios.