The effect of a YES/NO variable on the sum of another column

Hello
I have return form for my inventory app.
I record every return - before receiving the goods back.
I have a column. Goods received? YES / NO
with the NO option - the condition of the item remains the same.
when I receive a return from a customer (YES value) , I would like the sum of available items to increase by the number of items returned.
How can I do that ?
right now AVAILABLE column formula looks like this:
SUM([Returns][Pieces]) + [Available] + SUM([Purchases][Pieces]) -SUM([Sell][Pieces])

I just want to add YES value RETURNS.

Use a SELECT expression.

I am posting the logical blocks

SUM(SELECT(Table Name[Column concerned], [Status]=“YES”)]

1 Like

SUM(SELECT(Table Name[Column concerned], [Status]=“YES”)]

SUM(SELECT(Returns[Column concerned], [Received]=“YES”)]

Returns - name of the table
Received - Y/N value

what do you mean by “Column concerned” ?

The column for which you want to sum the values.

4 Likes

ok it works. thank you so much :heart_eyes:

2 Likes