May 11, 200520 yr Newbies 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!!!
May 11, 200520 yr 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?
May 12, 200520 yr 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.
May 12, 200520 yr 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.
Create an account or sign in to comment