Relation + Rollup question

I am playing around (and learning) with creating an app here.
Here is a link to the copyable app: https://needed-wash-9803.glideapp.io/

Sheet1 is a list of stocks the signed in user can choose from (a trading floor)
image

Sheet2 is a list of transactions when a user ‘buys’ (or sells) stocks.

Back n SHEET1 (the trading floor) I need a relation and a rollup that will count the number of each stock the SIGNED IN USER has in their portfolio.

So kevin would have 10-2=8 Apple shares and martha would have 1-2=8 Coke shares and 4 apple shares. I would even take two columns of “total bough” and “total sold” and then I could do a math column to subtract. So far I have only gotten a rollup of all shares bought regardless of signed in user to happen.

After watching @Robert_Petitto’s videos on inventory and dropping…
I have played around with adding a “signed in user” column in Sheet1 to do a relation to the transactions. But I just cannot get it to go.
But this is a bit different because they are selling (dropping or using) ‘part’ of what they bought, so a switch does not seem to work.

Any help with a relation or lookup or rollup?

1 Like

Hi Kevin, is this what you expect it to be?

Signed in as kevin@spencersrus.com.

Signed in as martha@spencersrus.com.

2 Likes

Yes! That is what I wanted and have spent hours trying to figure out! #genius!

Tell me how!

1 Like

https://subtle-request-8473.glideapp.io/

Here, you can copy it back. Let me know when you’re done so I can delete it at my end.

The key is to make a template column joining the email & the company so you can have a unique combination.

The unique combination prevent the problem above.

Then I make two rollups to bring back the ins and outs and a math column to finish it.

all copied on my end!

Thanks a bunch!

BTW I found this today in my alerts
image

5 Likes

Ha, you’re also one of the first ones here and still around. Congrats on the anniversary my friend :heart_eyes:

Do let me know if I can help more.

4 Likes