math formula

i just newly using glide and try to make ledger app. very basic app.
how to make all row auto calculate base on math formula. below my screen shoot.
debit-credit=bal. then last result in balance will do operation minus or plus in next row. that how it goes until end of row.

image

1 Like

Hola @Izhar,

If I understand correctly, you want to add/subtract the result of both columns, right?

If so, the way I would do it is to use a rollup column for the debit and a rollup column for the credit. Then that’s what I’d have in the math column.

1 Like

Hi Santiago,

Thank you for your opinion. I believe that what i want to do. to be more specific if user insert in debit or credit the result will be in balance. I used to do at spreadsheet using formula but it was manual. below is formula in spreadsheet.

1 Like

I’ve tried to implement a math formula which adds the current value plus the previous total through a relation, but there seems to be a bug and the math column doesn’t add the previous value

yeah that was my problem too but it worked on spreadsheet.
i am still doing manual at spreadsheet for balance column so it
kind of half automation.

Hi Izhar,

I faced the same the problem before.
I just using google sheet to do math. Because Glide can read the google sheet. Hmmm

I’ve solved it with a little help of @gvalero
image
image
image
I’ve made a relation with the previous item and then I add the current value with the previous total. @gvalero solved the issue with the sum in the total colum multipliying the lookup column *1

3 Likes

if you can elaborate a little bit? meaning i have to create new spreadsheet and do lookup or vlookup?

No, you can do it inside Glide using a relation - lookup - math column.

There are no calcs in google sheet. All columns are in Glide.

  1. A relation (“rel anterior”) associates each item with previous item
  2. A lookup column (“sum ant”), inside Glide, gets the value of the previous total sum (“sum”) using that relation
  3. A math formula , inside Glide, adds current item value with lookup column value in “sum” column. You can see the detail of this formula in the third picture.
1 Like

Hi Izhar,

Did you solved this issue?
If yes, share boleh tak?

Biha,
kau bantai ckp melayu ye :grinning:
belum lagi. you can try first and share result with us.

1 Like

This way possible tak?

image

Add column math tu yang “Debit - Credit”
And Roll up of “Debit - Credit” with sum
But it showing the last balance.