grumbachr Posted February 18, 2009 Posted February 18, 2009 I have a fairly large Let/Case calculation but I've been asked to change it slightly. I hope it doesn't get broken by this. I've been asked to evaluate if Field A is +/- 2 of Field B. I've never written any calc using this concept first can it be done, can I just add it to the case without adding fields or do think I need a field? Sorry if this is not explained well.
comment Posted February 18, 2009 Posted February 18, 2009 I am not sure what your question is. The test itself could be simply: Abs ( FieldA - FieldB ) ≤ 2
grumbachr Posted February 18, 2009 Author Posted February 18, 2009 Thanks let me try with a few examples. I need to know if FieldB is + 2 of FieldA or if FieldB is -2 of FieldA Record1- FieldA = 15 FieldB = 18 15-18 = -3 not within 2 Record2- FieldA = 14 FieldB = 13 14 -13 = 1 is within 2 Record3- FieldA = 12 FieldB = 13 12-13 = -1 is within 2 I first read that Abs had to be a positive number but it "returns" a positive number so that might work. I'll tinker thanks.
comment Posted February 18, 2009 Posted February 18, 2009 Abs ( 15 - 18 ) ≤ 2 returns False. Abs ( 14 - 13 ) ≤ 2 returns True. Abs ( 12 - 13 ) ≤ 2 returns True.
Recommended Posts
This topic is 6101 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