cancel
Showing results for 
Search instead for 
Did you mean: 

APODPDANT percentage calculation

Former Member
0 Kudos

Hi,

Situation:

I have a planning book where I have set the 'manual maintenance of prop.factors'. I have included APODPDANT as a keyfigure to the planning view. I know how to handle the button change: Absolute <=> Percentage.

Question:

How can I write a macro that automatically kind of pushes the Abs. <=> Perc.button? Business need is to get the percentage values automatically displayed when user drills down to details all level. What function, method, program is performed when the Abs. <=> Perc. button is pushed?

If the above is not possible how do I use macro operator: PERC_CALC as I have learned that this operator could solve my problem also? If that operator is unknown to you, is there a way to calculate percentage values based on columns as for some reason I have not been able to do that in details all level (time is moving dynamically forward and columns tend to stay in specific week).

Thank you before hand

Br,

JP

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Juha,

we have the same requirement. how did you resolve this finally?

many thanks.

Cliff

rajkj
Active Contributor
0 Kudos

Hi J P,

Here is a simple pseudo code to address your issue.

if ( PLOBS_FOR_LEVEL( 1 ) > 0 ) { //checking the detail level

//get sum of the children

LAYOUTVARIABLE_SET( 'SUM' ;  SUM_CALC( ROW - APODPDANT ) )

//Covert absolute to percentages

ROW-APODPDANT = (ROW-APODPDANT/LAYOUTVAR_VALUE( 'SUM' ) ) * 100

}

PS: ROW-APODPDANT is the macro row element corresponding to APODPDANT key figure.

Thanks,
Rajesh