Create a virtual column using sum and rest between two tables. One to many

See

4 5 689
5 REPLIES 5

Iโ€™d much rather see the use of references between Orders table and the Item table

  • this would remove the need for a hard-coded SELECT() and would instead run on the efficient REF_ROWS() built by the system.

Then your formula would look like thisโ€ฆ

[Units]
-  SUM([Related Orders][Units])

โ€ฆand would be much more efficient. If you plan on accumulating a decent amount of records, that SELECT() will come back and bite you - FYI.

Yeah, you rightโ€ฆ Works the same for me, but this is much easier and efficient, Thank you.

[Units]

  • SUM(Orders[Units])

Butโ€ฆ that doesnโ€™t take into consideration WHICH item it should be pulling the [Unit] value for.
That will pull the complete list of every value in the tableโ€ฆ and sum them all.

So if youโ€™re looking for a grand total of every [Unit] value added together, thatโ€™s the way to go.

  • But if you need things filtered specific to the [ItemID] - youโ€™ll have to include the SELECT()

References my friend

  • On the Order table, create a reference to the Items table - you likely already have a field were people can select the item (or items).

Very good tips @Denis_Sanchez_Leyva

Thanks Guy, I am new with AppSheet. I only tried to do that task for my own. I know is a long trip but I made what I wanted to do. Again Thank you very much.

Top Labels in this Space