Agian510 1 Posted November 10, 2020 Share Posted November 10, 2020 Hey guys, I am working on a brewing recipe file and I have created a IBU calculator. I have the calculation working but it needs to be based on all of the portal rows. Currently it only reads from the first portal row and will not make any further adjustments to the calculation for additional rows. I don't know if I am missing something in my calculation or what. This is the formula for the IBU field, and it is basing the findings from a portal called "Hop Database Copy" Brewing Recipes = ( Hop Database Copy::Quantity * ( Hop Database Copy::Alpha Acids * 100 ) * Hop Database Copy::Percent ) / 7.25 Thank you for your help, Alex Brewing Copy.fmp12 Link to post Share on other sites
comment 1,817 Posted November 10, 2020 Share Posted November 10, 2020 20 minutes ago, Agian510 said: it needs to be based on all of the portal rows What exactly does 'based on" mean? Should it sum up all the individual portal row results? Or maybe average them? Or ... ? Link to post Share on other sites
Agian510 1 Posted November 10, 2020 Author Share Posted November 10, 2020 Thank you for your response. Each portal row is it's own calculation but then I would like it to sum up each portal rows results. This should get the desired outcome that I am seeking. Link to post Share on other sites
comment 1,817 Posted November 10, 2020 Share Posted November 10, 2020 (edited) The simple method is to split the calculation into two fields: one defined in the child table that calculates a result for each portal record. The other, defined in the parent table, does simply Sum ( ChildTable::Calcfield ). Or you could define a summary field in the child table to do essentially same thing - total the calculation field. It is also possible to do this in a single calculation field in the parent table that loops over the child records and accumulates the individual results. However, you would need the Advanced version in order to construct a custom recursive function. Or version 18 or higher in order to use the While() function. -- P.S. All those parentheses are redundant. Edited November 11, 2020 by comment Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now