Addition of numerical values from a different column based on the fact that UID's are same

As you can see in the image, I want appsheets to add the MRP column of the sheet which has same UID’s.

0 8 179
8 REPLIES 8

I cannot understand what you are wanting. I suggest you ask it another way, or elaborate more.

Hi Marc,

Thanks for replying,

so basically i want appsheets to add the MRP value of products having same UID, as you can see in the above picture, Digyton syrup, Bow & Dental treat have the same UID, I want appsheets to add their MRP subtract discount if any, add the delivery charge if any and give me the total amount that i have to recieve.

is it more clear now?

I am trying to use SUM & SELECT but it is adding up all the values and not only the values which have the same ID as in the existing row


I have 2 sheets.

One is the Order sheet which has brief information about the order, like total amount received.

Other one is a Item Sheet which has a list of items under different orders.

So one order can have multiple items.

On the order sheet under the total amount received column i have put in this formula:

SUM(SELECT(Items[MRP], [Order ID] = [_THISROW].[Order ID]))

Which means that if the order id in the item sheet and order id in the order sheet is same, then select those items and add up their MRP.

When I am testing it, it shows 0.

I have attached images of the sheets.

Please help me out!

Your expression looks correct to me.

Don’t you have a parent-child reference setup here? Your parent Table should include an auto-generated “Related…” VC, with REF_ROWS() expression. You can calculate the same sum with just:

SUM( [Related...][MRP] )

Please show how you are testing and getting a 0 result.

I tried this but the problem is that the related column is a virtual column, so the total doesn’t update in the backend spreadsheet

A real (non-virtual) column value is only recomputed when the row is saved, as when saved in a form or updated by an action. To update a real column, you’ll need to use an action to update it when one of the related rows is updated.

Top Labels in this Space