Shopify order lines in a live spreadsheet
Add the Order lines table to a sheet as a data source named order_lines and its 15 columns become names your formulas, pivot tables and charts use. Sheets reads it from your store each time the sheet opens or refreshes.
Formulas on this table
=data.order_lines.sum(quantity_ordered) Total quantity ordered. Adds up the Quantity ordered column over every row of Order lines.
=data.order_lines.sum(quantity_ordered, product, A2) Quantity ordered per product. With a product in A2, the total for that one. Fill it down next to a list of them.
=list.order_lines(product) Every product, once. Spills the distinct product values down the column: the row labels for the formula above.
=data.order_lines.count(line_id, product, "<>") Rows with a product. Counts the rows whose Product is not empty.
=data.order_lines.avg(quantity) Average quantity. avg, min, max, count, countd (distinct) and first work the same way as sum.
Reports that use it
=data.order_lines.sum(quantity, product, A2) Units sold per product. Quantity per product from the order lines. List the products with =list.order_lines(product).
=data.order_lines.sum(net_amount, vendor, A2) Revenue per vendor. Net line amounts per vendor.
Columns
| Column | In formulas | Type |
|---|---|---|
| Line ID | line_id | Text |
| Order ID | order_id | Text |
| Order | order | Text |
| Order date | order_date | Date and time |
| Product | product | Text |
| Variant | variant | Text |
| SKU | sku | Text |
| Vendor | vendor | Text |
| Quantity ordered | quantity_ordered | Whole number |
| Quantity | quantity | Whole number |
| Unit price | unit_price | Number |
| Net amount | net_amount | Number |
| Currency | currency | Text |
| Product ID | product_id | Text |
| Variant ID | variant_id | Text |
Other sales tables
Your order lines, live
Orders, products, customers and inventory become live tables. Sales reports, stock lists and dashboards stay current without exporting a CSV, and AI assistants such as Claude can build them for you through MCP.