I need help with an virtual column stock formula

Hello.

Let me explain this situation.

I'm building a selling managment app. In this app we have an sells section, a buy section and a inventory section.

My problem is this: I can't find a way to make a formula that adapts to a virtual column (in which the stock detail will be taken). For example: In my inventory I have 3 t-shirts, T-shirt A, T-shirt B and T-shirt C.

T-shirt A has 1 existence in size XL, T-shirt B has an existence in size L and the last has an existence in size S.

When I make a material purchase, I should make it for a particular size, that is, I will buy a size L for the T-shirt B.

That purchase should mean that I now have two B shirts with L size and the other sizes should be empty for that shirt.

The same procedure for sale, when I sell a B T-shirt in size L, the existence should go back down to one.

I do not know what formula I should work with so that the system identifies the type of shirt I am buying and only increases the stock in a certain size (which I select in the purchase panel)

Solved Solved
0 1 109
1 ACCEPTED SOLUTION

SELECT(
 sell[quanitity],
 AND(
  [T shirt] = [_THISROW].[T shirt],
  [Size] = [_THISROW].[Size]
 )
)

This will get you the total quantity of T-Shirt/Size sold that match a row in Inventory table with the same T-Shirt/Size.

View solution in original post

1 REPLY 1

SELECT(
 sell[quanitity],
 AND(
  [T shirt] = [_THISROW].[T shirt],
  [Size] = [_THISROW].[Size]
 )
)

This will get you the total quantity of T-Shirt/Size sold that match a row in Inventory table with the same T-Shirt/Size.

Top Labels in this Space