Does anyone know if using double brackets in the 'calculate' section works?
I attach my form for reference.
You will see that in cell N37 and N38 I have tried to use double brackets so these two factors are multiplied together first, before I add the final factor.
Indeed, ${weightofindividual}+${numberofbowls}*${weightofbowl} should give you the same result. You only really need brackets when you need to override the default operator precedence (or to make it explicit to the casual reader...)
@Xiphware@abdoul Thanks for the observation. It is something that I didn't consider.
@Frances The problem you are having with my formula (no data) is something that I have experienced before with big operations. My solution was to have a two or more rows for different steps of the operation.
In your case, this would mean one row for the multiplication and one for the addition.
However, considering you already have the multiplication in N35 and N36, you can use the followings for N37 and N38:
Let's tease out where the problem is first. Do you see the data you want in Aggregate's web UI? And when you say exported CSV are you using Aggregate's export or are you downloading to Briefcase and then exporting from there?
Also, no need to tag folks in the thread. If they've already responded, they generally get notified
Inside your repeat group the questions you ask depend if it is either a bowl or an individual
Rows 30, 31, 32 for bowl
Rows 33 and 34 for individual
However, your calculations in rows 37 and 38 is adding the results of both bowls and individuals. This means there will always be an empty value or NaN in the calculation.
Wouldn't rows 37 and 38 be the same as rows 33 and 34 if the user selects "Individuals"?
I believe the problem has to do with relevance and it's a bit subtle.
If bowlorindividual is 2, then numberofbowls, weightofbowl, and priceofbowl are not relevant. And if they are not relevant, they are blank in the calculations for totalvaluebowl and totalcatchbowl. So, blank * whatever = blank. That's what you are seeing in the output CSV>
Calculation inputs that are not required or can be irrelevant can be blank and so you need to account for that in your calculation. So something like this: if(${numberofbowls}='',0,${numberofbowls})*${priceofbowl} should work.
The example I gave wasn't complete and that's why it didn't work.
Everywhere there is an irrelevant value has to have that calculation, so this: if(${numberofbowls}='',0,${numberofbowls})*if(${weightofbowl}='',0,${weightofbowl}) +${weightofindividual}
Hi Yaw - I tried these formulas and my export file now shows data in the 'totalvalue' and 'totalcatch' columns, however, they are simply a repeat of the data in columns F and G. The calculations only include the data from the individual catches and not the bowls. Therefore it does not show TOTAL catch.