Select by date from other tables

Hello! There are two tables: income and consumption of goods. How can I make the third table show only those products that came and went in the period I specified in the filters?

0 16 325
16 REPLIES 16

Aurelien
Google Developer Expert
Google Developer Expert

Hi @AndreyPanin 

You may want to get inspiration from this sample app:

Multi-Search Demo - AppSheet

 

My situation is somewhat different: there are 3 tables. The first is a list of products. In the second - the list of receipt of goods. In the third - the consumption of goods. These tables are linked by the key product_id. Let's say: I need to display the receipt and expenditure of goods for August 2022, displaying the name that is stored in the Goods table

Yes, and this sample app won't do the job ?

Let's say you have table GOOD, table RECEIPT, table CONSUMPTION

Let's say you would have a 4th table that is FILTER, with columns StartDate, EndDate, GOOD.

In this table, you would add two virtual columns, one for the receipts and the other one for the consumptions.

Your expression would be for the column [Filtered Receipts]:

 

FILTER("RECEIPT",
   AND(
    [DateReceipt]>=[_THISROW].[StartDate],
    [DateReceipt]<=[_THISROW].[EndDate],
    [product_id]=[_THISROW].[GOOD]
  )
)

 

Your expression would be for the column [Filtered Consumptions]:

 

FILTER("CONSUMPTION",
   AND(
    [DateReceipt]>=[_THISROW].[StartDate],
    [DateReceipt]<=[_THISROW].[EndDate],
    [product_id]=[_THISROW].[GOOD]
  )
)

 

 

And how can I combine these two virtual columns into a common table?

These are virtual columns. So, it may be anywhere you want: you would need to adjust the expressions.

After a day of experiments, I only managed to filter from one table: either "the list of receipt of goods" or "the consumption of goods". How can I now make this table display the columns "Name" "Amount of receipt" "Amount of consumption"?

1.jpg

I think that I will be explaining how my application looks like for a long time, I suggest to look and give advice, if possible

App 

You may find something helpful from these videos:

Report Table 

Enhanced Dashboard 

Aurelien
Google Developer Expert
Google Developer Expert

@AndreyPanin can you share a screenshot with column names in english ?

"After a day of experiments, I only managed to filter from one table: either "the list of receipt of goods" or "the consumption of goods". How can I now make this table display the columns "Name" "Amount of receipt" "Amount of consumption"?"

"Amount of " will be:

SUM([list of receipt of goods][Amount])

 

.

3.jpg

Aurelien
Google Developer Expert
Google Developer Expert

Did my last suggestion help you ? 

It would turn as:

SUM([Receipt][Amount])

and

SUM([Consumption][Amount])

Do I need to write these formulas into new virtual columns?

yes

Perhaps you do not quite understand me. I want the report to look like this:

Report.jpg

For this report, I have the following tables:
Products:
Products.jpg

Receipts:

Receipts.jpg

Сonsumption:

Сonsumption.jpg

Can somebody help me?

Aurelien
Google Developer Expert
Google Developer Expert

Hi @AndreyPanin 

"I want the report to look like this:"

If you mean a document created with AppSheet, I suggest having a look to these documentation links:

Use templates in an automation - AppSheet Help

Use templates in an automation - AppSheet Help

Create and save a file from an automation - AppSheet Help

 

Top Labels in this Space