Hi, I have a POS system App and I am looking to find a way to SUM total the related product sales to a particular customer. I have the system-generated related sales that are being displayed on the customer UX detail view. But I need to create a Virtual Coloum that displays the total from related sales from this.
Please let me know if anyone knows the expression for this.
Thanks
Based on your description, it sounds, you could use dereferences. In the Customer detail view, you could have a Total Sales Column with an expression something like
SUM([Related Sales][Sales per Order])
[Sales per Order] is the sale value of each line item in the related sales table.
Dereference expressions - AppSheet Help
Please post back with relevant details of tables ( corresponding column names , reference relationship and what you are looking for) if you are looking for something else.
1 Like
I think the only problem is the sales record is being recorded on another table.
Table 1: Bottle Sales: uses a REF From Table 2
Table 2: Vip Table Request
VIP table Request ( Virtual Table – Releated Sales From Bottle Sales Through a REF) Looking to take the Total From (Bottle Sales of Each Line Item related to the REF i.e customer and SUM the total.
in this example it is a count instead of a sum , but I would prefer to have a coloum that can be displayed in the detail view
Maybe this?
SUM([Related Bottle Sales][sales number per line item in Bottle Sales Table])
I am sorry I did not properly understand your description. So above suggestion is based on current understanding.
1 Like
Related Sale is a system generated. This is due to the REF Customer ( source Table: Vip Table Request ) key being used for the Bottle Sales Form. When a new sale Is made and it matches the VIP table request contact it auto generates int other Related Sales Virtual Table. As show in the last screen shot i posted.
Now I am trying to get the related sales information into a coloum on the Vip Reqeust Detail UX. I want to SUM-related sales into a virtual column in my VIP Request Table.
However, the Only Coloum that i can pull from in the VIP request table is Related Sales. Ther is no total that exists on this table and would have to take it from the Bottle Sales Table.
[sales number per line item in Bottle Sales Table]) this information would have to come from the Bottle Sales Table. Could i do a table look-up to achieve this?
Yes, correct. That is what I mentioned, you will get total sales in the Vip Table by an expression
SUM([Related Bottle Sales][sales number per line item in Bottle Sales Table])
Please take a look at the dereference expressions.
1 Like