I am starting a new diet that is based on weights (grams) of food rather than calories. There are multiple food groups. I can choose however many foods from each food group as long as I don’t go over the weekly gram allowance… it’s a little complicated.
Anyway, I am trying to build a tool to help with the calculating/tracking so I don’t have to think about it as much. I have a table for each food group with the food name and the weekly allotted grams.
The image below is one of the food groups “first course” - so to be clear I cannot have ALL of those, I can have up to the amount in “weekly allotment” of any of them.
So if I have 100 grams of Couscous one day, I need ALL the values in the “remaining” column for that table to be reduced by the percentage consumed (in this case 20.83%). This is where I am getting stuck.
I am able to reduce the values in the row. I did this by adding a column to calculate the percentage (thisRow.Consumed/thisRow.[Weekly Allotment]) *100
and then having the “remaining” column reduced by that percentage (thisRow.[Weekly Allotment] * (100 - thisRow.[Percentage Con]) /100 )
But I need the “remaining total” in ALL rows to be reduced by the percentage/s in any row in the table. Any help is greatly appreciated!