5 Replies Latest reply on Mar 6, 2012 4:38 PM by philmodjunk

# Find the lowest value of 5 parameters

### Summary

Find the lowest value of 5 parameters

### Product

FileMaker Pro

### Description of the issue

Hi
Im have 5 parameters giving values from 1 to 4. I need to summarize those 5 parameters into one result, so that if one of five parameters gives the value "1" the final result will be 1, regardless what the other results are. And if the lowest of the parameters are 2 the final result will be 2 and so on.

eg.
parameter 1 = 4
parameter 2 = 4
parameter 3 = 3
parameter 4 = 4
parameter 5 = 1

then the final result is 1.
How can I set a calculation up that does that for me?

• ###### 1. Re: Find the lowest value of 5 parameters

To return the minimum value:

Min ( field1 ; field2 ; field3 ....)

or

Min (\$Pram1 ; \$Param2 ; \$Parm3....)

or

Min (repeatingField )

or

Min ( \$Repeatingvariable )

or

Min (RelatedTable::Field)

If the values are in different records, you can also use a summary field with the minimum option.

• ###### 2. Re: Find the lowest value of 5 parameters

thx

do you know if it is possible to set the calculator to choose field3 between parameter 3 or 4 decided by the result of another parameter. so that is only 3 or 4 that is in the equation

regards

Henrik

• ###### 3. Re: Find the lowest value of 5 parameters

Are these "parameters" fields in the same record?

There are any number of calculations using IF or Case you might set up depending on what you mean by "decided by the result of another parameter".

• ###### 4. Re: Find the lowest value of 5 parameters

yes they are.

im looking on how much the blood is saturated with oxygen. but the there are different thresholds if the patient where recieving oxygen on a mask or not.

if the sat is <95% and the patient got oxygen on a mask it scores 2. but if he did not get oxygen he would get 3.

i have one field that say "no oxygen" =1 or "with oxygen" =2, lets call this field c

i have made a calculation that scores 1-4 wiht oxygen thresholds and whitout oxygen thresholds. lets call with o2 "a" and without o2 "b"

I want to have a calculation that choose between a or b. so that if c=1 the field shows the result from b or if c=2 the field shows the result from a.

then i can put my choose calculation into my min calculation.

• ###### 5. Re: Find the lowest value of 5 parameters

If ( c = 1 ; b ; a )

or

Case ( c = 1 ; b ;
c = 2 ; a ;
"error" )