Only add Quantity to Products table from Purchased table

Hello My Dear Sir,

Let me ask a question.

I have Two Tables. Purchased and Products tables

It’s my action name - Add by Purchased

Table - Products

Do this - Set the value of some columns in this row

Set these columns - Stock Initial

Expression - Any(Select(Purchased[Qty],

[ID]=Maxrow (“Purchased”,“_RowNumber”,[Item]=[_THISROW].[Item])))+[Stock Initial])

In Purchased Table there is one action.

Do this - Execute an action on set of rows

Reference table - Products

Reference Rows - Select (Products[ID],[Item]=[_THISROW].[Item])

Reference Action - Add by Purchased

My question is here.

These action don’t work.

How to do that?

Actually when I add new purchased for existing products it will be add new quantity to existing quantity automatically by only action.

So Please let me show the way.

Thanks

Your add [stock initial] must be out of the fonction any. Maybe you have too a default initial value to the column.

I have no default initial value in [Stock Initial]

How to solve to get my ambition?

Thanks

did you correct your formula ?

like this :

Any(Select(Purchased[Qty],

[ID]=Maxrow (“Purchased”,“_RowNumber”,[Item]=[_THISROW].[Item]))))+[Stock Initial]

Any(Select(Purchased[Qty],
[ID]=Maxrow (“Purchased”,“_RowNumber”,[Item]=[_THISROW].[Item])))+[Stock Initial]

I already corrected this formula.

But it’s not work still.

It seems to me I had the same problem ome time and that I done was add the new row and with the bot update the column value.

Thanks I will try another way.