AnjaNi Posted January 11, 2009 Posted January 11, 2009 Hello, In my database I have four fields; FW, PW and PD, displaying different width measurements, and Result, displaying a value depending on a calculation of FW, PW and PD. The following alternatives should determine the value in Result: If FW≤1/3PW, Result = A If 1/3FW≤PW≤2/3FW, Result = B If 1/3FW≤PW≤2/3FW; PD>1/2PB, Result = C If PW≥2/3FW, Result = D If PW≥2/3FW;PD>1/2PB, Result = E Any suggestions of how I formulate this in a calculation?
Raybaudi Posted January 11, 2009 Posted January 11, 2009 If FW ≤ 1/3PW, Result = A I think that you inverted the terms... Didn't have to be: If PW ≤ 1/3FW, Result = A ? If 1/3FW ≤ PW ≤ 2/3 FW ; PD > 1/2 PB, Result = C Where comes from: PB ? If that is another field that you forgot to mention, you can try this calculation for result: Case( PW ≤ 1/3 * FW ; "A" ; PW ≤ 2/3 * FW and PD > 1/2 * PB ; "C" ; PW ≤ 2/3 * FW ; "B" ; PW > 2/3 * FW and PD > 1/2 * PB ; "E" ; PW > 2/3 * FW ; "D" )
AnjaNi Posted January 12, 2009 Author Posted January 12, 2009 Thank you very much! This worked perfectly.
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