Sum stock by range date

Dear AppSheet Team,

 

I have problem for total sum, I want to calculate the total material that must be returned if the maximum limit is 3 days after collection. 

For example, I have the outbound table, with the following conditions:
- there are 2 materials with a request date of 13 September and must be returned on 16 September
- What must be returned are those in the stock column with a minimum qty of 1 unit
but why is there material with the date 30 August still being read, so that in the virtual column stock available the total is 2 units instead of just 1 unitoutbound table.jpgvc formula.jpgreturn.jpg

Thanks for the help

Regards,

Firdaus

 

0 4 167
4 REPLIES 4

FIRST OF ALL.

Make sure that the google sheet table is configured with the same region that your application has in appsheet, also (in the date field) make sure that it is configured with date format. Sometimes when we enter the data from AppSheet the date is entered with one format and other times when we enter it from the editor to do tests, it has another format.

Maybe I'm wrong but I can't find the [TGL Return] column in your table.

Dear @Gustavo_Eduardo , 

thanks for reply

sorry i forget to inform you, i have 2 table (outbound & return)

Fxu9nLeVQj.jpg

Do you have a column called [Related Outbound] or something like that? Because if so, you could try the same expression but using the following

SUM(SELECT([Related Outbounds][Stock],AND({Your Condition})))

Tell me if you could.

 

Note that [Related outbound] is a virtual column that is generated automatically and that, in case both tables are related, the virtual column stores the records related to the current row. In this case you will also reduce the synchronization speed since you are using a calculation that already exists in that VC

Another thing, in the test condition:

Another thing, in the test condition:

AND(
......
[TGL Pickup] + 3 <= [TGL Return] 
)

instead of

AND(
......
[TGL Pickup] + 3 = [TGL Return],
[TGL Pickup] <= [TGL Return]
)

dear @Gustavo_Eduardo ,

the result still not i want yet

new formula_with related_outbounds.jpgrelated_outbounds.jpgresult_with related_outbounds.jpg

i already change (before)

[TGL Pickup] + 3 = [_THISROW].[TGL Return],
[TGL Pickup] <= [_THISROW].[TGL Return]

to :

only [TGL Pickup] + 3 = [_THISROW].[TGL Return]

or 
only [TGL Pickup] <= [_THISROW].[TGL Return]

result still the same

thanks for your help

 

Top Labels in this Space