Re: Subtract according to row values

Jump to Solution
3381 1
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

Hello guys!
I would like help to do a subtraction according to the values ​​that are being established.

The situation is as follows: I work in credit format with my clients, so they start the month with 8 credits, as they request me, I establish the value in credits and these are consumed. Because of this situation, I would like to create 3 columns, 1 column “Cost in credits”, 1 column “Remaining credits” and 1 column “Total credits”. As I establish the cost of each material, I would like the column “Remaining credits” to be the result of “Total credits”-“Cost in credits”(for each row).

I know Airtable has a different focus than spreadsheets, but the point is that I’m really enjoying the platform and I’d like to centralize as much activities as possible here, my company is just starting out, so splitting things across multiple platforms ends up messing up the flow of work.

If there is a way to do what I said, I would be very happy.

Thanks in advance!

13 Replies 13

Okay, but that way I would lose the function of adding credits automatically every month.
For example: I would like each month to automatically add 8 credits for “Customer 1”, 10 credits for “Customer 2” and 6 credits for “Customer 3”. What’s the best way to do this while retaining all of the previous functionality?

The idea I had was to set up a conditional for each customer using this formula: (DATETIME_DIFF(TODAY(), {Date}, “months”) + 1) * X(value of credits per customer)

Thats exactly what I was suggesting. Just replace the hardcoded 12 with the field showing how much each customer should accrue.

Sorry, I hadn’t understood the suggestion.
That worked really well!!

Thank you very much for your attention and patience, Kamille!

6 - Interface Innovator
6 - Interface Innovator

Kamille, a situation occurred to me.
I was wondering, if the customer decides to change plans, how would I go about taking the new plan into account without changing the old information? Example: Client 1 contracted 8 credits until 12/25/2021, but started to contract 10 credits on 01/25/2022. I thought of putting the amount of credits together with the clients name as “Client 1 - 8 Credits”, so if they change plans I create one as “Client 1 - 10 Credits”, but the question is, how would I do for the Does “Client 1 - 8 Credits” count stop after he changed plans? I don’t know if it’s the best alternative, but it was a solution that came to me now for this situation…

PS: Taking this possible solution into account, I thought of creating a field called “Contract Status” and having the options “Active” or “Paused” and changing the formula of the “Credits accrued” field to something like:
IF({Contract Status }=Active,(DATETIME_DIFF(TODAY(), {Start Date}, “months”) + 1) * {Monthly Credits}), 0)

I don’t know if it’s the best solution or even if it works (I couldn’t make it work), but I’m just trying to help with the answer.