Select highest value from set of calculations

Hi All

I have a set of calculations that sets the total units of alcohol consumed
per location. There are 13 locations in total.

Once we have all the totals we would like to ask a question relevent to the
location where the highest value was set. So we want to calculate the
location where the highest amount if alcohol was consumed and set the
${hiloc}

For the highest location we want to ask "what type of alcohol was consumed
at ${hiloc}"?

Obviously we want to show the location nwame in place of ${hiloc}

Is this possible?

Thanks

Bashir,

Don't think so.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, professional support, custom reporting, and software development for ODK.

On Thu, Oct 17, 2013 at 11:46 AM, Bashir Jahed admin@osilab.net wrote:

Hi All

I have a set of calculations that sets the total units of alcohol consumed
per location. There are 13 locations in total.

Once we have all the totals we would like to ask a question relevent to the
location where the highest value was set. So we want to calculate the
location where the highest amount if alcohol was consumed and set the
${hiloc}

For the highest location we want to ask "what type of alcohol was consumed
at ${hiloc}"?

Obviously we want to show the location nwame in place of ${hiloc}

Is this possible?

Thanks

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

But if the there were fewer, you could do this.

The problem is that the if-then-else for 13 locations will be very very
large and impossible to write or execute.

What you can do is collect data for all 13 locations, then compute and
store the max consumption and location for the first 4 (1,2,3,4), compute
this max and location-of-max for the next 4 (5,6,7,8), and compute the max
and location-of-max again for the next 4 (9,10,11,12).
These 4-part if-then-else expressions are probably small enough that you
can reasonably wrap your head around them.

Now, with these 4 max values ( max(1-4), max(5-8), max(9-12), 13 ), repeat
the if-then-else to find the max among these.

With this 4-step process, you can probably get at the answer you want.

Mitch

··· On Mon, Oct 21, 2013 at 5:39 PM, Yaw Anokwa wrote:

Bashir,

Don't think so.

Yaw

Need ODK services? http://nafundi.com provides form design,
professional support, custom reporting, and software development for
ODK.

On Thu, Oct 17, 2013 at 11:46 AM, Bashir Jahed admin@osilab.net wrote:

Hi All

I have a set of calculations that sets the total units of alcohol
consumed
per location. There are 13 locations in total.

Once we have all the totals we would like to ask a question relevent to
the
location where the highest value was set. So we want to calculate the
location where the highest amount if alcohol was consumed and set the
${hiloc}

For the highest location we want to ask "what type of alcohol was
consumed
at ${hiloc}"?

Obviously we want to show the location nwame in place of ${hiloc}

Is this possible?

Thanks

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com