Skip to main content
I am trying to create a formula field that applies a weighted percentage to the opportunity amount, so I can use this field to create a report and sum up.  Essentially what I am trying to do is use a fixed % for each week in a month, and apply that to the opportunity amount for a deal with a closed date in that same month.  For example:

 

If we have deals with closed date in July, when we are week 1 of that month, the % is 75%.  When it is week 2 in that same month, the percentage drops to 50%, week 3 25% and week 4 is 10%.

 

This way, if a deal has an oppy amount of $1000, on week 4 of the month, the formula field would show $100 on the oppy page.

 

Also, I want to make this formula apply for only specific opportunity stages.  so if I have oppy stages of:

 

Lead

 

Discovery

 

Proposal

 

Verbal

 

Closed-Won

 

I want the formula to only apply the weighted value for Discovery through Verbal.  Obviously Closed-Won should be left as is, and Lead we do not want a part of this weighted value.

 

I searched around for various formulas to see how to get this to work, but can't get it to evaluate what I want.  Any ideas community?
5 respuestas
  1. 17 jul 2012, 21:54
    I figured it out!  here's the code I used, for anyone else with a similar problem.  I'm sure there is a more elegant solution, but here's how I got it done (using our Oppy Stages)

     

    IF( 

     

    OR( 

     

    ISPICKVAL(StageName,"Go/No Go"), 

     

    ISPICKVAL(StageName,"Propose"), 

     

    ISPICKVAL(StageName,"Negotiate T&Cs"), 

     

    ISPICKVAL(StageName,"PO System") 

     

    ), 

     

    CASE(Day(TODAY()), 

     

    1, Amount * 0.75, 

     

    2, Amount * 0.75, 

     

    3, Amount * 0.75, 

     

    4, Amount * 0.75, 

     

    5, Amount * 0.75, 

     

    6, Amount * 0.75, 

     

    7, Amount * 0.75, 

     

    8, Amount * 0.50, 

     

    9, Amount * 0.50, 

     

    10, Amount * 0.50, 

     

    11, Amount * 0.50, 

     

    12, Amount * 0.50, 

     

    13, Amount * 0.50, 

     

    14, Amount * 0.50, 

     

    15, Amount * 0.25, 

     

    16, Amount * 0.25, 

     

    17, Amount * 0.25, 

     

    18, Amount * 0.25, 

     

    19, Amount * 0.25, 

     

    20, Amount * 0.25, 

     

    21, Amount * 0.25, 

     

    22, Amount * 0.10, 

     

    23, Amount * 0.10, 

     

    24, Amount * 0.10, 

     

    25, Amount * 0.10, 

     

    26, Amount * 0.10, 

     

    27, Amount * 0.10, 

     

    28, Amount * 0.10, 

     

    29, Amount * 0.10, 

     

    30, Amount * 0.10, 

     

    31, Amount * 0.10, 

     

    0), 

     

    0)

0/9000