Help

Subtract multiple values in two different coluns in the same row

Topic Labels: Formulas
481 2
cancel
Showing results for 
Search instead for 
Did you mean: 
luizgualmeida
4 - Data Explorer
4 - Data Explorer

I have multiple values in two separate cells located within the same row. My objective is to subtract the first value from the "Stock" column from the first value in the "Quantity for Production without Units" column, and continue this process accordingly. Finally, I would like to place the result in a third column.

So it would be something like

Estoque          Quantidade para produção sem unidades          Estoque-Consumo

46200                              6000                                                            40200

luizgualmeida_0-1692063802312.png

Thanks!

2 Replies 2
corb1
6 - Interface Innovator
6 - Interface Innovator

So - technically this may be possible by stripping the first value out into a formula field for each column, then performing the calculation on those two formula fields.

However, your data design is not ideal here, storing multiple values in a single field. You would be better off to design your tables to have a single value per cell, then this makes calculations and rollups work as intended.

luizgualmeida
4 - Data Explorer
4 - Data Explorer

Thank you for the response, corb1.

Yes, it would be much easier if they were already on a single line each. The issue is that these numbers are coming from another script.

It's a calculation I perform for a biofertilizer production line. In other words, if we receive an order for 1000 liters of our product, I need to calculate the quantity of each raw material that will be used according to the product formula per liter. The second table represents our stock for each of these raw materials.

The step I'm trying to address is automatically calculating how much of each raw material we will use, subtracting the quantity we have in stock.