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!

Formula - Compare Multiple variables 1

Status
Not open for further replies.

wld1957

Technical User
Feb 3, 2006
68
US
CRXI - I created a formula (1) to compare a (selling date {cpmain.courtdate}) with the current date. If the selling date was before the current date a formula of (1.5 before sales) was applied. If equal to or after the selling date an (after sale poundage) was applied.

Number 1 works great but I had to introduce a new variable in the formula and I have not been able to get it to work. If the selling price (({@Tax-Before N after Total Costs} = Sale price - Sum ({@SS})) then before sale was poundage was to be applied {@1.5 Before Sale}. If the selling price was greater than the original selling price then after sale poundage was to be applied. I have tried several variations over the past few days without success. There are no errors but I either get before sale poundage correct or the after sale poundage correct. I have not been able to get both on their respective records. I'm having a difficult time combining the two dates and the other variables. Any ideas would be greatly appreciated. Thanks in advance.

Selling date - {cpmain.courtdate}
Selling Price = {@Tax-Before N after Total Costs}
Sale Price = {@SS}
Works: But need to add comparative of selling price:
1. - If {cpmain.courtdate} >= currentdate then {@1.5 Before Sale} else Sum ({@After Sale Poundage})

Do not work:
//If {cpmain.courtdate} >= currentdate and ({@Tax-Before N after Total Costs} = Sum ({@SS})) then {@1.5 Before Sale}
//else Sum({@After Sale Poundage})

//If {cpmain.courtdate} <= currentdate then {@1.5 Before Sale}
//else if ({cpmain.courtdate}) >= currentdate and ({@Tax-Before N after Total Costs}) = Sum({@SS}) then ({@1.5 Before Sale})
//else Sum ({@After Sale Poundage})

Bill
 
You need to post a sample of your raw data, and the result set you are currently getting and the result set that you want to receive.

Its difficult to visualise what you are trying to achieve.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top