How do I add a value from one table to another based on a condition?

So basically I have one main table that contains the information I am working with. This table contains the names of each cage, while the rest of the tables have choice elements connected to them to keep the names of each cage the same as originally input into the main table.

So based on this, I would like to add the option of working out the mortality rate of each cage based on the values of the original cages table and then the added value of the secondary table which includes multiple information based on death, sold, and so on. Now I want to be able to add all the death together in my reductions table and work out the mortality percentage in my original table where the data of how many birds were in to begin with.

Is this even possible? I know exactly how to do this in excel but this is my first time using glide to cut excel out. So now I need a VLookup based on certain conditions in table A to find the data in table B, add all the values of table B that corresponds with the conditions, then calulate the percentage mortality in a new column in table A.

Thanks in advance. Please explain slowly as I am new to Glide.

Should be quite straight forward with Glide computed columns.

Could you add a couple of screen shots of how your data looks in the Glide Data Editor?
This will make it easier to visualise a solution.

This is my main table. I want to add the mortality rate to this table.


On this table, birds can be decreased based on cull, death, sold, stolen, lost or other. I want to be able to do statistics based on this table in my first table. Each day data is entered according to cages and therefore I need to be able to add data together based on cages and which reduction reason.

Sorry, can you create screen shots that are readable? It’s impossible to make out the column headings in those screenshots.

Second table

Okay, I see.
So your second table is basically a log of sorts, yes? With each row being a log of an event for a specific cage.

So in the simplest form, all you really need is a multiple relation column in your first table that matches the cage name with the cage name in your second table. This will establish a link between each cage and all related records for that cage in the second table.

Then you can use that relation to do things like sums, averages, max, min, etc using rollup columns.

More complex calculations are possible using various other computed columns and plugins.

The relation column I get, but if I do a sum in rollup it just gives a total in each column for everything.

Your rollup must use the relation instead of the entire table.

It does not give me the option to choose the relation column.

Is it a multiple relation?

Yes, but multiple or not I can’t select the column. It does not even show it under the selection of columns for anything.

Okay, something doesn’t sound right. Can you show a screen shot of that relation column and how you have it configured?

Nevermind. Found it. But now my question is - will it only pull the deaths through and not all reductions?

I don’t really understand what a reduction is. Can you explain a bit more?

How would a reduction be represented in your second table, and how would you tell the difference between a death and a reduction?

The second table has a choice column called “reason for reduction”. Underneath this column, you can choose cull, death, sold, lost, stolen, and other. I only want to pull deaths through to my first table and calculate the daily inputs of death as a total according to the cage against the number of birds in that cage to calculate the mortality rate.

Okay, got it.

So what you should do is create a template column in your first table that joins the Cage number and the word “death” (exactly as it would appear in the second table).

Then create a similar template column in your second table that joins the cage number and the “reason for reduction” columns.

Now create a multiple relation column in your first table that matches those two columns.

Any rollups that you do through that relation will now only consider deaths.

1 Like

I am not following. Can you please elaborate.