Skip to content
Discussion options

You must be logged in to vote

Use the command addcol-aggregate. It groups rows by the key column, then calculates an aggregator for the group.

So, make product_code the key column using !. Then create 2 aggregates on the grouped rows: the sum of each product's quantity, and the sum of each order's quantity*price. The full list of keystrokes would be:

= quantity*price Enter %
^ order_revenue
Navigate to the product_code column, then press !.
Navigate to the order_revenue column, then Space addcol-aggregate Enter sum.
Navigate to quantity, then Space addcol-aggregate Enter sum.
= order_revenue_sum / quantity_sum Enter ^ avg_product_price

Note that when you edit the cells or add new rows,= will update its calculated resu…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aszenz
Comment options

@midichef
Comment options

Answer selected by aszenz
@aszenz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants