Skip to Content
0
Former Member
May 07, 2008 at 04:58 PM

Macro Question - No of Iterations logic

25 Views

All -

I am working on a user requirement which they want to carry out in the data view real time and hence I was wondering if a macro can be written to have a logic as explained below

3 Key Figures - KF1, KF2 & KF3. KF3 is the final resultant row for which the macro is to be written.

In the initial step I have given an input box to the users to enter the number of periods for which the required logic should be calculated (iterations) starting from the "current period". So if the user enters a value of 3 it means the logic should work for Current period + 2 periods in future. This part was easy and is done.

The actual logic is - for the above entered value in the input box (i.e. for those many periods), KF3 should = KF2. For ALL future periods after that, KF3 = KF1. I was wondering if the ITERATION_COUNTER operator function would help but am somehow not getting the syntax right.

Can someone help me out here.

Regards

Mandar