How to pick a minimum value in a range whilst disregarding empty / null values

Hie guys

I’d like to pick the minimum weight of a child from a range of values. some
of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Eva

Hi Eva,

Rhe easiest way to do this is probably to use one of the conditional
functions per argument, and a ‘sentinal’ value which is larger than the
others IE:

min( coalesce(#form/value, 1000), coalesce(#form/value_two,
1000), coalesce(#form/value_three, 1000))

this would mean that any blank value was evaluated as ‘1000’ rather than
’0’.

-Clayton

··· On Mon, Oct 16, 2017 at 6:16 AM, Eva wrote:

Hie guys

I’d like to pick the minimum weight of a child from a range of values.
some of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Eva

You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an

Thanks Clayton…

That worked well

··· On Mon, Oct 16, 2017 at 7:03 PM, Clayton Sims wrote:

Hi Eva,

Rhe easiest way to do this is probably to use one of the conditional
functions per argument, and a ‘sentinal’ value which is larger than the
others IE:

min( coalesce(#form/value, 1000), coalesce(#form/value_two,
1000), coalesce(#form/value_three, 1000))

this would mean that any blank value was evaluated as ‘1000’ rather than
’0’.

-Clayton

On Mon, Oct 16, 2017 at 6:16 AM, Eva eva.tsitsi@gmail.com wrote:

Hie guys

I’d like to pick the minimum weight of a child from a range of values.
some of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Eva

You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an