Help

Re: Quantity x price formula in the same row

1734 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Melissa1
6 - Interface Innovator
6 - Interface Innovator

Capture d’écran 2022-04-28 à 11.59.12

Hello Airtable community!

I would like to be able to choose the quantity of a product A or B ON THE SAME ROW and multiply this quantity with their indicated unit prices.

  1. Is my approach right? do you have another solution?
  2. How to multiply the quantities (by products entered) and unit price (by products entered) to obtain a TOTAL
    Is there a formula?

Thank you

4 Replies 4
John_Reid
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey Melissa,

I was able to create a formula that will allow you to do this. I recreated your screenshot, see below.

Screenshot 2022-04-28 at 14.27.43

Here is the formula in ‘Total’:

((IF(FIND(",",Quantity)!=0,LEFT(Quantity,(FIND(",",Quantity)-1)),Quantity)+0)*(LEFT(ARRAYJOIN({Price (from Test 1)}, ","),FIND(",",ARRAYJOIN({Price (from Test 1)}, ","))-1)+0))+(IF(FIND(",",Quantity)!=0,RIGHT(Quantity,(FIND(",",Quantity)-1)),Quantity)+0)*(RIGHT(ARRAYJOIN({Price (from Test 1)}, ","),LEN(ARRAYJOIN({Price (from Test 1)}, ","))-FIND(",",ARRAYJOIN({Price (from Test 1)}, ",")))+0)

You should be able to copy this into your ‘Total HTVA’ field and just change the field names to match yours.

I should state however that this will only work for 1 or 2 products, anymore and it would not work. If you were likely to have more than 2 products then maybe there is another way.

Thank you John for your quick response! it’s very nice. Yes, indeed. I would like to add as many products as I wish ( but also in one line ), do you have a solution?

If a maximum number of products you could link exists, you could create individual link fields, like this.

Screenshot 2022-04-28 at 14.59.51

You could hide some of the fields to clean up the view. Although, if there are lots of products to link, this becomes very clunky very quickly.

Alternatively, the formula I posted above could be extended to include a lot more products, but it would take quite a long time to write.

Sorry I can’t be of more help, hopefully someone else has experienced something similar in the past and has a solution I haven’t come across.

I understand, no worries, thanks for your help!!! :kissing_heart: I hope someone can complete your formula or suggest another idea. again a big thank you for the time you spent