Adjusting Total Value Formula

Hi, 

I wanted to ask, if anyone knows how to adjust the total value formula (standard opportunity field):

ifElse(and(isNumeric($quantity), isNumeric($discount_price)),
ifElse(equal($quantity, 0),
$total_amount,
currencySubtract(
ifElse(isNumeric($subtotal), $subtotal, multiply($discount_price, $quantity)),
ifElse(equal($discount_select, "1"),
currencyMultiply(
ifElse(isNumeric($subtotal), $subtotal, multiply($discount_price, $quantity)),
currencyDivide($discount_amount, 100)
),
ifElse(greaterThan($quantity, 0),
ifElse(isNumeric(toString($discount_amount)),
ifElse(greaterThan(0, $discount_price),
negate($discount_amount), $discount_amount
), 0
),
ifElse(isNumeric(toString($discount_amount)), negate($discount_amount), 0))
)
)
), ""
)

My goal is to add two new conditions, as I want it to not only sum the $discount_amount, but data from two additional fields?

Best, 

Ada

Parents Reply Children
  • Hi ,

    I am having difficulties attaching a screenshot at the moment. 

    It's a standard currency field with no calculated formula. 

    I actually updated the formula to: 

    add(rollupConditionalSum($revenuelineitems,"total_amount","sales_stage",forecastSalesStages(true,false)),related($revenuelineitems,"non_arr_fee_c"),related($revenuelineitems,"ps_price_c"))

    Surprisingly, The non_arr_fee_c field is working fine and is being summed to Total Contract Value field on the opportunity...