cancel
Showing results for 
Search instead for 
Did you mean: 

Use of ITERATION_COUNTER in APO DP

Former Member
0 Kudos

I am using APO DP V5.

In a macro, I want to be able to, for example, have a step which is based on 'future' time buckets, but within this step, perform a calculation on a specific bucket (for example bucket 5).

I notice the macro function ITERATION_COUNTER which seems to provide a 'counter' on the number of buckets processed.

But I am having difficulty in making my macro statement IF ITERATION_COUNTER = 5 actually work.

Does anyone have any experience using this function?

Thanks, Bob Austin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bob

Iteration_counter will return the total number of iteration in the step. So if you want to test it working : - Use an auxilliary row and make any Auxilliary Cell = ITERATION_COUNTER. This will retun the number of iterations you can see in the Macro step. So if the step is 10 iterations from time bucket week 1 to week10 then you will get 10 as the answer.

Am not sure if it will give you a value for each bucket that will be increasing by 1

ACT_COLUMN will actually give you the current time bucket

(ITERATION_COUNTER - ACT_COLUMN) will give you the number of future time buckets available