Calculating within column

Hi Guys

Not sure if this has been discussed before, if it has, appreciate if you can point me to it, but i have been trying to calculate between 2 columns and within a column itself.

Afterwhich, I need the answer to auto populate a following table, something like a summary table.

For eg - The Daily consumption of Fuel Oil on Apr 1 will auto generate at the Daily Consumption Table once the log from the vessel is recorded on Apr 2 morning on the R.O.B table. Also a top-up of Fuel once once a week will need to be taken into account.

I’ve attached a diagram . Using Xcel it will be the If logic formula… Thanks in advance.

Hi @salihin_sulaiman
and welcome to Coda Community! :handshake:

It would be great if you could share your document - or a sample of it - by clicking the Share button on tor right, then Embed (so that you can paste it here) and give the appropriate permissions.

What is the calculation you would like to perform?

Many Thanks!

2 Likes

HI

Thank you for the response. But I don’t see any share button that you are referring to. Btw, I have already posted with the diagram of 2 tables and the stuff i wanted to calculate. You cant see it on your end?

Thank you.

We can’t see any of the actual calculations.
There’s great help in he coda help docs (online) about sharing documents. It lets you embed a copy of the document into this forum - so we can all better understand what people are asking.
It took me a while to figure out as well, but once you do it makes things much easier for everyone.

1 Like

Okay. Thats what I thought I must be missing something. Thanks for the heads up.

Hope this works.

For eg - The Daily consumption of Fuel Oil on Apr 1 will auto generate at the Daily Consumption Table once the log from the vessel is recorded on Apr 2 morning on the R.O.B table. Also a top-up of Fuel once once a week will need to be taken into account. Thanks in advance.

Link https://coda.io/d/Project-2X_dJ8wU_PIIZf

Hi
You need to change the permissions for this doc so we can see it. In the sharing setting change to “everyone with the link - can view”

1 Like

Thanks !. Hope it works

Hi @salihin_sulaiman,

Glad to have you here!

I don’t know that I’m understanding exactly what you need, so I put together this doc that I think is close. Check it out and let me know if this is what you’re looking for. Also, the button can be triggered by an automation that can run daily if you needed this to update every morning.

Hi Ben

Thanks for the reply. What I need though is pretty simple actually. Sorry didn’t explain myself clearer.

The Daily Consumption Table is a simple subtraction function of 2 days reading of the first table (R.O.B)

Eg - To find out the Daily Consumption of Fuel Oil for 1 Apr

1 Apr = 1800

2 Apr = 1500 … So 1 Apr Daily Consumption is 1800-1500 =300 units of Fuel Oil

3 Apr = 1000 … So 2 Apr Daily Consumption is 1500 - 1000 = 500 units of Fuel Oil

4 Apr = 2200 … So 3 Apr Daily Consumption is (1000+3000) - 2200 = 800 units of Fuel Oil …

So everytime the R.O.B Table is being filled with the daily readings, the Daily Consumption Table gets filled automatically.

Hope that is clearer. Thanks in advance.

@salihin_sulaiman

See if the formulas in the blue columns are helpful.

I’ll check on your progress tomorrow.

2 Likes

Okay @salihin_sulaiman, I understand it better now. I updated my example with a few more columns to make this happen and to better show what’s going on.

There’s a Previous Day Info column that pulls the row from the day before, then we can pull values from that reference for calculations. It’s using a filter formula to do this, so instead of using that filter everywhere I needed a value from the previous day, I just used the filter once in it’s own column, then I can reference that value much easier for all the other formulas.

Now the FO Daily Consumption and LO Daily Consumption columns I added should be the correct math.

2 Likes

Thank You so much for the help.

But I think there is another issue - The daily consumption for Fuel Oil on 4 Apr is not 2200 coz the Data for 5 Apr is not recorded yet. So the formula has to be able to leave Daily Consumption for 4 Apr blank if there is no recorded data for the following day (from the first table) yet. Yes ?

Its OK . I’ll just try to get this table done somehow. Thanks once again!!

You can create formulas the include a catch for all of these things, or you can simply hide that column and let it keep the running calculation, then disable the button so it can’t be clicked until those fields are entered for that day.

Try hiding all the formula columns there and only show the button column. Then you only have the answers in your second table that are the real totals.

Keep playing around with these features and I’m sure you’ll land on something that works for you.