Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation with if then formula - Crystal

Status
Not open for further replies.

jlr123

Technical User
Feb 24, 2014
117
US
I need a formula for the following (which does not work of course):
if {AR_Customer.SalespersonNo}="ACT" and if sum {AR_InvoiceHistoryDetail.ExtensionAmt} for {AR_InvoiceHistoryDetail.UDF_CC_CODE}= "ONS,RENT,SVC" = 76,000 THEN *5.0%

Thanks for your assistance!
 
What are you testing for and what should be done it the test is true and what should be done if the test is false.

 

This is a bonus calculation based on the salesperson,the total amount of sales in specific categories and if the total amount is =>than 76,000 then that bonus is 5%. If the total amount in those categories do not => than 76000, then "NO BONUS".
Thanks again.
 
Never mind, I have determined the right formula.
 
Please post the formula you used. It might just help others in the future, or it may be that someone can suggest better/different/more efficient ways of doing the same thing.

Cheers
Pete
 
I created a running total:
If GroupName({AR_InvoiceHistoryDetail.UDF_CC_CODE})in
["ONS","RENT","SVC"] THEN Sum({AR_InvoiceHistoryDetail.ExtensionAmt})

And then:
{#RTotal0}*.0125,

An then:
IF ({AR_Customer.SalespersonNo} = "BSB") AND {#RTotal0}>= 76930 then ({#RTotal0}-76930) *.050 ELSE 0.00
 
Now I need to sum the sums of the regular commission and bonus commission. I think I need to create local arrays for the separate commissions. I will have to research or perhaps someone has an answer to this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top