Report and input value with YTD in BPC Embedded Model
Particular for balance sheets reports a period to data calculation is needed for consolidation as well as for planning. Most of the time one has a year to date calculation called YTD which takes beginning of the current year (either the calendar year or fiscal year) and continuing up to the present day. Also QTD (quarter to date) can be found starting with the beginning of the current quarter.
While BPC standard provides both periodic or YTD storage and periodic or YTD display, BPC embedded only can store data periodical since basic InfoProviders in BW don’t store aggregated data. To calculate the YTD values the analytic engine (OLAP) of BW provided a feature for the standard time dimension (info objects: 0CALDAY, 0CALMONTH and 0FISCPER), namely a current member variable. The SAP standard documentation shows some very nice examples how model YTD computations with restricted key figures and restrictions of type interval from start of the year till the current member as upper border. Even more complex use cases can be achieved when spanning over multiple years by using multiple intervals.
For example for year 2012 one can set one hidden key figure
With the first line we can ensure that following years do not get any results. For year 2013 another hidden key figure
Ensures that only this year gets values. We now add all those hidden key figures to one general visible key figure showing YTD for each year.
We plan to simplify this kind of modeling by introducing new variables for the start and end of period.
So far we talked about reporting only. But how about using YTD in planning and make the key figure input ready. As always planning is a kind of inversion of reporting, so changing an input-ready YTD value should change only the last period value contained in YTD. This can be achieved with input-ready formulas as follows.
First we model a hidden key figure restricted to year to date minus one period. When using 0CALMONTH then YTD-1 is the previous month.
Then we have a second hidden key figure to normal perodic value which is input enabled.
Now we create a visible formula which add the YTD-1 value and the current period value to have again YTD
To make this calculated key figure input ready we also set it to be input ready and define an inverse formula to set the current periodic value out of the change of the YTD value.
Then we can start planning on the YTD key figures.
One restriciton on this approach is that in this example I only can update one period value per Material and then a roundtrip to the server is needed. In other words the user needs to press ‘Transfer Data’ before it updates the next period.
Hi William,
Very useful blog.
What can we do if 0FISCPER is not in Aggregation level and instead we have 0FISCPER3 (like in all delivered Aggregation levels)?
Thank you,
Gersh
Hi Gersh,
Of course you can use 0FISPER3 instead, but the measure creation can be a little different.
Best regards, William
Hi William,
But current member variable doesn't work on 0FISCPER3. Can you give and idea of a work around?
Thank you,
Gersh
Hi Gersh,
since 0FISCPER3 has similar to 0CALMONTH2 not possible since it looses the context of the year. But we introduced now to a new variable for FirstValue of Period to pick always the start of the period. Create then again a variable of replacement current member. After creating it go back to the modelling Tools and edit Operator to 'First Value'
Hi William,
First of all thanks for the blog entry. We are following this approach to create reports in BPC Embedded that show YTD numbers but we are facing an issue when using the current member formula.
If we set the access type for result values option of the characteristics in the BW query to "Master Data", the YTD key figure may not show us the correct values. For example, if I am running my report for July and there is no periodic movement in the database for that month, then the YTD key figure does not bring any results from prior months. The YTD key figure only brings the YTD values for those accounts, etc. that have some movement in the month of analysis.
We have managed to find a workaround by setting up the access type for result values option in the BW query to "Master Data" for all characteristics. This way the YTD key figure brings always the right result. However, this has impact on performance. Also, we are consuming the queries in SAP Analytics Cloud, and in this system we can't have the option "Show Unbooked values" and zero suppression activated at the same time.
Is setting up the access type for result values option to master data a known limitation to this approach or could be that we are doing something wrong?
Thanks
Jorge
Hi William,
First of all thanks for the blog entry. We are following this approach to create reports in BPC Embedded that show YTD numbers but we are facing an issue when using the current member formula.
If we set the access type for result values option of the characteristics in the BW query to "Master Data", the YTD key figure may not show us the correct values. For example, if I am running my report for July and there is no periodic movement in the database for that month, then the YTD key figure does not bring any results from prior months. The YTD key figure only brings the YTD values for those accounts, etc. that have some movement in the month of analysis.
We have managed to find a workaround by setting up the access type for result values option in the BW query to "Master Data" for all characteristics. This way the YTD key figure brings always the right result. However, this has impact on performance. Also, we are consuming the queries in SAP Analytics Cloud, and in this system we can't have the option "Show Unbooked values" and zero suppression activated at the same time.
Is setting up the access type for result values option to master data a known limitation to this approach or could be that we are doing something wrong?
Thanks
Jorge
Hi Jorge,
in principle YTD with current member and unposted should work. Are the characteristic and the characteristic used for unposted the same?
Here a query result showing the data for a complete year. The current member variable is defined for "Fiscal year/period"
Notice that there is only data for May, June, and September 1999.
With a filter on July 1999 the result is
If you can't reproduce this, then it might be a bug. Can you please open an incident on component BW-BEX-OT-OLAP such that we can check this.
Thanks,
Stefan