Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5903 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I've let my filemaker go bit rusty and I'm driving myself mad trying to remember how to make a calculation that gives a result based on a range of numbers.

ie.

1-10 =10

11-20 = 20

21-30=30 etc

I've tried case (field >1 <10;10 etc etc i've a feeling that I'm missing something between the >1 and <10???

Thanks in advance,

Skip

Posted (edited)

Case (

field < 10 ; 10 ;

field < 20 ; 20 ;

field < 30 ; 30 ;

... continue and then if there is a default result

;

999

)

Since vs. 7, calculations short circuit and stop evaluating when they hit the first true. There is also concept of predicting which groups will have the largest numbers of records returned and planning for it.

For instance, if you know that 80% of your records are above 80 but not over 100 then it works best to reverse the theory as:

Case (

field > 100 ; 999 ;

field > 90 ; 90 ;

field > 80 ; 80 ;

... etc.

Taking advantage of branch prediction will speed up evaluations overall.

Edited by Guest
Added explanation

This topic is 5903 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.