wplate Posted July 2, 2010 Posted July 2, 2010 I don't really know how to ask the question so I can't find the answer that is surely very obvious. I have a field that is a number, and as that number goes over 50 and approaches 100 I would like a calculation to return a number that goes from 48 down to 24. Can you help? Thank you.
TheTominator Posted July 2, 2010 Posted July 2, 2010 You didn't specify the exact mapping of input to output, but you might be looking for something like this. Case( theNumber > 75; 24; theNumber > 50; 100 - theNumber; theNumber )
wplate Posted July 2, 2010 Author Posted July 2, 2010 Thanks. Here's a more concrete example: As Field1 goes from 50 to 100 I would like Field2 to go from 36 to 24. So when Field 1 is < or = to 50 Field 2 = 36. When Field1 is between 50 and 100 Field2 is similarly between 36 and 24. Then when Field 1 is > or = to 100 Field 2 = 24. It is the middle part where Field2 interpolates along its range in response to Field1 that I can't work out.
TheTominator Posted July 2, 2010 Posted July 2, 2010 field2 = Case( field1 ≤ 50; 36; (field 1 > 50) and (field1 < 100); 48 - field1 * 12 /50; field1 ≥ 100; 24; 24 ) Note that the field1 ≥ 100 condition is redundant since that's all that is left after the first two, but I included it for readability.
wplate Posted July 2, 2010 Author Posted July 2, 2010 Thank you, Tom, I can understand (I think) your calculation, I'll try to make it work.
Recommended Posts
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