cancel
Showing results for 
Search instead for 
Did you mean: 

YTD calculation for calculated keyfigure

Former Member
0 Kudos

Hi Experts,

I have successfully configured YTD for a stored key figure using steps mentioned in SAP Note 2288329. But now we have a requirement to configure YTD for a calculated key figure as well. I have tried using the same steps as in SAP Note 2288329 but it does not work for calculated key figure. Is there any other way to configure this?

Thanks,

Ankita

Accepted Solutions (0)

Answers (1)

Answers (1)

sourojit_pal
Participant
0 Kudos

Hi Ankita,

The Solution mentioned in the note 2288329 has worked well for calculated KF in our case.

Can you please elaborate a bit on the problem you are facing?

Regards,

Sourojit

Former Member
0 Kudos

Hi Sourojit,

Thanks for your reply!

Actually, the note is working fine for simple calculated KFs (eg. KF with sum of other KFs). But there is a special case where the solution is not working. Let me explain the situation below:

We have configured YTD at PERIODID3 (month in our case) for around 10 KFs (includes both stored and calculated KFs). All are working fine.

Now,we have a special calculated KF which has the formula:-

KF3 = IF("PERIODID3" < "$$PERIODID3CU$$", KF1, KF2)

If we configure YTD for KF3 it does not work.

Do you have any idea?

Regards,

Ankita

Irmi_Kuntze
Advisor
Advisor
0 Kudos

did you try to have KF4 = KF3, make the YTD calculation for KF4 and only display KF4 ?

Former Member
0 Kudos

Hi Irmhild,

We have tried that as well and it did not work.

Another issue is that when we configure YTD for KF3, all other YTD also stop working and if we remove it YTD for other KFs start working again.

Regards,

Ankita

Irmi_Kuntze
Advisor
Advisor
0 Kudos

can you share how you configured all the details? Hard to find the reason without... Some screenshot, or a document that explains all formulas

is your YTD calculation on monthly buckets, meaning you check on PERIODID3, or do you check on PERIODID0 ?

sourojit_pal
Participant
0 Kudos

Hi Ankita,

Also, can you please check the Request level calculation as as well for KF3?

Assuming, Base Planning Level of KF3 is PerProd, the request Level definition most likely should have: KF3@Request = KF3@PerProdTimeAGGMode.

Regards,

Sourojit

Former Member
0 Kudos

Unfortunately I cannot provide any screenshots as we have removed the KF from our planning area in order to make other aggregations work correctly. But let me explain the configuration we made for aggregation of KF3:

Base Planning level contains month as base.

Defined KF4 as follows:

KF4@basePL = KF@basePL


KF5 is the YTD KF:

KF5@Request = SUM(KF5@basePLTIMEAGGMODE)

[input KF-  KF5@basePLTIMEAGGMODE(not stored)]

   

KF5@basePLTIMEAGG = KF4@basePL

[2 input KFs- KF4(not stored) and TIMEAGGHELPER(stored)]

KF5@basePLTIMEAGGMODE = SUM(KF5@basePLTIMEAGGATT)

[input KF- KF5@basePLTIMEAGGATT(not stored)]

               

attribute transformation defined at PERIODID3 (month in our case)

PERIODID3@basePLTIMEAGGATT = TIMEAGGPERIODS

[input KF- KF5@basePLTIMEAGG(not stored)]

sourojit_pal
Participant
0 Kudos

Hi Ankita,

Can you please describe the data that you were getting as output?

We were also initially facing a issue where YTD was getting calculated properly. In our case the problem was due to a mismatch with Time Profile data.

Can you please check if the data of the TIMEPERIODS attribute in TIMEAGG MDT that you have filled is in alignment with your Period IDs of the Time Profile data?

Regards,

Sourojit

Former Member
0 Kudos

Hi Sourojit,

The output is quite weird: PTD mode shows correct result whereas in YTD mode the system compares the value with current period and takes the max value.

We have checked TIMEAGG master data and Time Agg Heper KF data and it looks correct. Moreover as I mentioned earlier, once we remove TIMEAGG calculation for this KF all the other TIMEAGG KFs are working fine so that means the master data must be correct.

One more thing, we tried to configure a copy of the original KF in a different way as follows:

Instead of putting condition on PERIODID we have now configured

KF4 = IF( ISNULL(KF1), KF2, KF1), since KF1 only has data in past and KF2 only in current and future periods.

And then we configured time aggregation on KF4. By still we see the same incorrcet output.

Have you configured any such KF in your system? and does time aggregation work for that KF?

Regards,

Ankita.

sourojit_pal
Participant
0 Kudos

Hi Ankita,

Yes Ankita we have tried the solution out on a calculated KF in our system and the aggregation worked perfectly.

Can you please share a snapshot of the output you are getting?

Also, please check the "Time Profile Period ID" values against the values you have placed in "TIMEPERIODS" attribute in TIMEAGG master Data.

Regards,

Sourojit

Former Member
0 Kudos

Hi Sourojit,

Thanks for your reply. Actually what I meant to ask was have you configured any calculated KF for time aggregation that has IF condition or IF condition on PERIODID?? Has that worked for you?

Below is the screenshot of the output:

I have checked the Time Profile Period ID values with TIMEPERIODS attribute values and its correct.

Regards,

Ankita.