cancel
Showing results for 
Search instead for 
Did you mean: 

Macro in Percentage

Former Member
0 Kudos

Hello Experts,

I need help on how to Build a macro to compare the percentage value, for ex, if my final forecast is greater than 50% of my last year sale then color the cell red, so all i need to know is how can i write this macro as a percentage,

please show me how to write this.

Accepted Solutions (1)

Accepted Solutions (1)

jagannadhb
Active Participant
0 Kudos

Hi Ganesh,

To color the cell, you have a function CELL_BG(X). In your case since you want Red color it should be 6, that leads to Row: Final Forecast = CELL_BG(6).

Now for your condition, if you have Yearly buckets, then it is very simple, just have a condition

IF

Row: Final Forecast (period)

>

(1/2) Row: LY Sales (period)

Row: Final Forecast = CELL_BG(6)

END IF

In case, if your buckets are in Monthly or lesser, you can use SUM Function for your last years sales (if you want to add up the entire year sales)

Regards

JB

Former Member
0 Kudos

thanks for the reply, but where would i put the > 50% calculation?

Former Member
0 Kudos

and also my last year sale keyfigure is an auxillary key figure where i wrote a macro to copy last year sale to this keyfigure, so now i want to claculate my final forecast is greater than 50% of my last year sale then color red thats all

jagannadhb
Active Participant
0 Kudos

Hi Ganesh,

Please notice the following screen shot, I have included the 50% in the macro as 1/2

Regards

JB

Former Member
0 Kudos

thank you

Former Member
0 Kudos

Just curious when you put 1/2 ROw is that a calculation or its a row

Answers (0)