Hi Good day!
I am stuck on my app, can someone help me maybe you guys know how to do this on appsheet.
I have a sample database, I want to see the total number of alike items. Sample given below on how the view should look like,
Sample Database:
Item
Qty
Apple
2
Orange
3
Apple
4
Orange
5
Target View:
Item
Qty
Apple
6
Orange
8
Please help me what formulas I can use for this and also how to do it.
Thank you!
Create another sheet and connect it in the app. The values would be the unique values from your sample dataset. See sample table below.
Item
Qty (use this column if you will use SUMIFS() inside Google Sheets)
Apple
Orange
If you will use virtual column, the formula would be:
SUM(
SELECT(
Table[Qty],
[Item] = [_THISROW].[Item]
)
)
2 Likes
SkrOYC
April 4, 2022, 2:27pm
4
There is no way on AppSheet at the moment that I know of to make a summary dinamically.
Now, you could have a group by where the group is the Item and aggregate by Sum:: Qty.
It’s the best solution from the stock UI options.
Anything else would require a workaround
1 Like
I agree with @SkrOYC that you’d better use UX views to group items and dynamically display the corresponding sum; to avoid impacting your app’s performance.
If however, you still want to generate your “Target View”, you can do the following:
Create a slice with the following expression as the slice’s row filter condition:
[_RowNumber] = MIN( SELECT(Table[_RowNumber], [Item] = [_ThisRow].[Item]) )
Add a virtual column with the following app formula:
SUM( SELECT(Table[Qty], [Item] = [_ThisRow].[Item]) )
Create a new view and for your slice.
2 Likes