Ricardo Posted March 11, 2003 Posted March 11, 2003 Hi Guys, i have a problem in that the calc below will set the field with a number depending on the job cost. Now if the job is below 1000 the field needs to be set as 1 and so on (see below) but for some reason it sees that if the cost is for example 120 it sets the field as a 4 and not a 1. i have the understanding that the case function will take the first true result?! so therfore if cost = 120 then the result is 1. Am i missing something? i have set fields in that the number format is set to two decimals and a "," for thousand seperators. Case( IsEmpty( ncrCost), " ", Cost < "1,000", "1", Cost < "2,000", "4", Cost > "2,000", "5") Tnanks in advance, ricardo
LaRetta Posted March 11, 2003 Posted March 11, 2003 Hi Ricardo With a number field, you don't need the thousand separator or the quotes in the formulae. Case(IsEmpty(ncrCost), "", ncrCost < 1000, 1, ncrCost <= 2000, 4, 5) Your calculation also skipped a value if the ncrCost equaled 2000, so I changed that to <= 2000. You can adjust that as needed. You also don't need to list the > 2000 because all remaining records will (by default) be 5. That should give you what you want. LaRetta
Ricardo Posted March 11, 2003 Author Posted March 11, 2003 LaRetta , muchas gracias! yeah it works. always the simple things that are confusing!! thanks again, ricardo.
Recommended Posts
This topic is 7985 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now