How to calculate the total number of products by customer group. The purpose is to print reports (because appsheet has Group by View but does not have Group by function). I hope Appsheet soon updates the group by function
SUM(
SELECT(
Data[Quantity],
[Label] = [_THISROW].[Label]
)
)
However, relying on the label is not a good option as it can be repeated, it is best to use the ID
If you want to see this from your customers view, the ideal is to do SUM([Relate Customers][Quantity])
I want it to automatically group customers together and then calculate the total. just like query function in google sheets. Thanks for your support
It is not good practice to have two tables on the same sheet. AppSheet is a data manipulation and visualization tool, therefore it will show what you have in Google Sheet and manipulate it.
You can group by clients from the view, you have to go to view and do what I told you with the image. Group Aggregate (SUM Product)
I imagine you have a customer table, you can create a virtual column in it that brings together the products sold by customers, as I told you --> SUM([Relate Customers][Quantity])
The results table is created from this statement =QUERY(A2:E9,"SELECT B, SUM(E) GROUP BY B",1) in google sheets
I understand, you use Google Sheet to do calculations behind the scenes (I don't recommend it, but if you do it this way, what I recommend is that you don't copy the query on the same sheet, for reasons of data order). I've never worked like this, so I don't know how to proceed. In particular, I do everything from AppSheet and Google Sheet is simply a database and it works.
yes, i want Appsheet update the group by function, according to the command in the Appsheet. thank you
yes!, it definitely exists and it is called group aggregate
I already know this. I want a group by function like this in Google sheets. here is the Results Table created from this table in Google sheets
=QUERY(A2:E9,"SELECT B, SUM(E) GROUP BY B",1) Thank you for your support
I'm sorry. Leave the post open for someone expert in this to respond (of course I will follow closely to learn. Regards.
thank you for your spport
User | Count |
---|---|
36 | |
9 | |
3 | |
3 | |
2 |