Database Reference
In-Depth Information
20 percent above cost (hey, it's a competitive market). If you use the Max() calculation as it
is now, then the new discounted price is more than the normal price. You need to go back and
add to your calculation so that it takes the regular price into account, and uses that price if
it's lower than the calculated discount. Read on to learn how to think through this calculation
quandary.
Constructing the Calculation
When calculations start to get complicated like this discount price example, you can visual-
ize the finished calculation by imagining that you have a calculation field that contains the
value you need. You can use this pretend field in your new calculation and then, when you're
all finished, put the original calculation in place of the pretend field. In this case, just pretend
you have a field called Calculated Discount that holds the discount price. With that imagin-
ary field in mind, create a calculation with this formula:
Min ( Calculated Discount ; Price)
The result of this calculation is either the calculated discount or the regular price, if it's
lower. Now, just put the original calculation in place of the words “Calculated Discount”
(since the original calculation results in the calculated discount ):
Min ( Max ( Price * .95 ; Cost * 1.2 ) ; Price)
Search WWH ::




Custom Search