cancel
Showing results for 
Search instead for 
Did you mean: 

Macro requirement

prasnop
Participant
0 Kudos

HI Experts,

Could some one help me in the below macro requirement.

Macro requirement as below:

I have a PB which is in MONTHS for future 24 months  (from current M 09.2013 to M 08.2015).

In this case The macro which i want to calculate from month 01.2015 to  month 08.2015.


second - if the current month is M 10.2013 then in the future end of the bucket will be extended  to M 09.2013 (rolling - 2 years)

In this case i want to calculate the macro from month 01.2015 to  month 09.2015.

if the current month is  M 11.2013 - Future end bucket will be  M 10.2015 (rolling - 2 years)

In this case i want to calculate the macro from 01.2015 to  month 10.2015.


if the current month is  M 12.2013 - Future end bucket will be  M 11.2015 (rolling - 2 years)

In this case i want to calculate the macro from 01.2015 to  month 11.2015.


if the current month is  M 01.2014 - Future end bucket will be  M 12.2015 (rolling - 2 years)

In this case i want to calculate the macro from 01.2015 to  month 12.2015.


if the current month is  M 02.2014 - Future end bucket will be  M 01.2016 (rolling - 2 years)

In this case i want to calculate the macro for the month 01.2016 only.

if the current month is  M 03.2014 - Future end bucket will be  M 02.2016 (rolling - 2 years)

In this case i want to calculate the macro for the month 01.2016 + 02.2016.


if the current month is  M 04.2014 - Future end bucket will be  M 03.2016 (rolling - 2 years)

In this case i want to calculate the macro for the month 01.2016 + 02.2016+ 03.2016.


current
month










M
09.2013
M
10.2013
M
11.2013
M
12.2013
M
01.2014
M
02.2014
M
03.2014
M
04.2014
M
05.2014
M
06.2014
M
07.2014
M
08.2014












end month
of the PB
M
9.2014
M
10.2013
M
11.2014
M
12.2014
M
01.2015
M
02.2015
M
03.2015
M
04.2015
M
05.2015
M
06.2014
M
07.2015
M
08.2015

M 9.2015M 10.2015M 11.2015M 12.2015M 01.2016M 02.2016M 03.2016

The thing is I want to calculate the macro for the year 2015 by rolling way. If the 2015 is completed then I want to calculate the macro from Jan 2016 to end of the 2016 by rolling way.


Please some one help me how I can achieve this requirement. Please let me know if any information is needed on this.

Thanks for your help.

Regards,

Prasnop

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

Hi Prasnop, it seems that you only want to calculate for the buckets of the last year in the data view. An idea is to get the last year first from the last bucket of the data view, then judge for each bucket whether it's in the last year. For example, I want to set 'Additional Key Figure 1' as 100 only for the last year's buckets, my macro would be like:

For the "Row: Addtional Field 1" acts as parameter for function BUCKET_EDATE(), do not forget to set the 'Data Source' as 'Column Attribute'.

Best Regards,

Ada

prasnop
Participant
0 Kudos

HI Ada Lv,

Thanks for your reply,

Scenerio-1

Actually If the current bucket (Month) falls in between July to December (current year) then the macro should consider the last year of PB. That means A KF should copy into the B KF for the last year in the PB if the current bucket falls from July to Dec.

Regards,

Prasnop

former_member187488
Active Contributor
0 Kudos

Is this the same requirement? Or another one?

prasnop
Participant
0 Kudos

Hi Ada Lv,

This is the same requirement which I mentioned above in detail. I am sorry if you are confused with that. Let me know if any information is needed on this.

former_member187488
Active Contributor
0 Kudos

Of course you can write a similar macro as the above ... I don't think you're asking the same scenario as your  first question ...  However it should be very easy, by judging on MONTH (BUCKET_EDATE()).

Answers (0)