Newbies sylvainb Posted May 11, 2005 Newbies Posted May 11, 2005 Hi, I'm a newbie with Filemaker Pro 7...I want to create a formula as follow: I have a value1 and I have a conditions to have a result in value2 If value1 is < 1 then the value2 is 10 If value1 is > 1 and < 5 then the value2 is 20 If value1 is > 5 and < 10 then the value2 is 30 and so on.... How can I make this in Filemaker?...Please help!!!
comment Posted May 11, 2005 Posted May 11, 2005 What do you mean 'and so on'? I don't see a pattern here. And what happens when value 1 = 1 or value 1 = 5, and so on?
MoonShadow Posted May 12, 2005 Posted May 12, 2005 Would love to use Choose() here but you are correct - it's missing 1,5 etc. Hard code could be: Case( Value1 < 1; 10; Value1 < 5; 20; Value1 < 10; 30 ) ... and so on.
comment Posted May 12, 2005 Posted May 12, 2005 I don't know if it works or not - because I don't know what it is supposed to do. There are only three ranges - and you assume one of them to be an exception. That is not enough data. FWIW, I think you can achieve the same result by: Case ( n < 1 ; 10 ; 10 * ( Div ( n ; 5 ) + 2 ) ) Or, if you'd like the boundaries fall the other way: Case ( n <= 1 ; 10 ; 10 * ( Ceiling ( n / 5 ) + 1 ) ) But writing formulae that hit some arbitrary target with arbitrary input is not my idea of fun. Let the poster clarify the logic behind this, and the formula will practically write itself.
Recommended Posts
This topic is 7475 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