Report from multiple tables

Hi,

I am building a sales report.

I have a SalesOrders Table with a SalesOrderDetails child table that lists the products sold in the Parents SalesOrder

I have a GoodsReceivedNotes Table with a GoodsReceivedNoteDetails child table that lists the products delivered

I would like to make a report showing, for a user provided date range and customer name, the following results:

  • the list of products from the SalesOrderDetails
  • the quantity ordered for each product
  • the quantity delivered for each product

I am not sure what the best way to go about is.
I have created a SalesReport table in Google Sheets and a form in my app with

  • Customer Id
  • StartDate
  • EndDate

Then a VC called _SalesOrderDetailsInTimeFrame with the formula
SELECT(
SalesOrderDetails[SalesOrderDetail Id],
AND( [SalesOrder Id].[Customer Id] = [Customer Id],
[_SalesOrderDetail_Date] >= [StartDate],
[_SalesOrderDetail_Date] <= [EndDate] )
)

The VC returns a table that lists the products ordered in the correct time frame and customer.

I could similarly create a VC that returns the list of products delivered in the same time frame and customer.

My question is: How do I display in the same โ€œtableโ€ , that list of products with the SUM of quantities ordered, SUM of quantities delivered, Grouped by Products?

Is there a better way to do what I am trying to accomplish in a totally different (maybe easier) fashion using maybe slices and views, etc?

Thank you!

Solved Solved
0 7 553
1 ACCEPTED SOLUTION

AppSheet is not well suited to present reports in-app like this; reports, though, are well suited. It is possible to do what you want, but itโ€™s complicated, delicate, and heavy.

Itโ€™s a lot easier in an email report. A single โ€œreport tableโ€ cannot easily contain data from multiple other tables.

Nope.

Not really, believe it or not.

The way I would think to approach this would be to have a separate Products Report table, one row per Product, with Qty and Volume virtual columns that compute their values from the โ€œcurrentโ€ report table row. The โ€œcurrentโ€ sales report might be setup as a dashboard view that includes a slice of the Products Report table that includes only the relevant rows.

View solution in original post

7 REPLIES 7
Top Labels in this Space