ライブスプレッドシートで使える Xero invoice lines
Invoice lines テーブルを invoice_lines という名前のデータソースとしてシートに追加すると、その26個の列が、関数、ピボットテーブル、グラフで使える名前になります。Sheets は、シートを開くたび、または更新するたびに Xero の組織データ から読み取ります。
このテーブルで使える関数
=data.invoice_lines.sum(quantity) Quantityの合計. Invoice linesのすべての行について、Quantity列を合計します。
=data.invoice_lines.sum(quantity, contact, A2) Contactごとのquantity. A2 にcontactを入力すると、その1件の合計になります。一覧の隣で下にコピーしてください。
=list.invoice_lines(contact) すべてのcontact(重複なし). contactの重複しない値を列方向に展開します。上の関数の行ラベルになります。
=data.invoice_lines.sum(quantity, date, ">=2026-01-01") ある日付以降. Dateが2026年1月1日以降の行のみ対象です。">="、"<"、"<>" などの条件は、一般的なスプレッドシートと同じように使えます。
=data.invoice_lines.count(document_id, contact, "<>") Contactがある行. Contactが空でない行を数えます。
=data.invoice_lines.avg(unit_price) Unit priceの平均. avg、min、max、count、countd(重複なし)、first も sum と同じ方法で使えます。
このテーブルを使うレポート
=data.invoice_lines.sum(line_amount_excl_tax, item_code, A2) 品目別の売上. 品目コードごとの請求明細(税抜)。
=data.invoice_lines.sum(line_amount_excl_tax, tracking_1_option, A2) トラッキングカテゴリ別の売上. トラッキングオプション(地域、プロジェクト、部門)ごとの売上。
列
| 列 | 関数での名前 | 型 |
|---|---|---|
| Document ID | document_id | テキスト |
| Invoice no. | invoice_no | テキスト |
| Date | date | 日付 |
| Contact | contact | テキスト |
| Contact ID | contact_id | テキスト |
| Payment status | payment_status | テキスト |
| Status | status | テキスト |
| Description | description | テキスト |
| Item code | item_code | テキスト |
| Account code | account_code | テキスト |
| Account ID | account_id | テキスト |
| Quantity | quantity | 数値 |
| Unit price | unit_price | 数値 |
| Discount % | discount | 数値 |
| Line amount | line_amount | 数値 |
| Line amount (excl. tax) | line_amount_excl_tax | 数値 |
| Line tax | line_tax | 数値 |
| Tax type | tax_type | テキスト |
| Amounts are | amounts_are | テキスト |
| Tracking 1 | tracking_1 | テキスト |
| Tracking 1 option | tracking_1_option | テキスト |
| Tracking 2 | tracking_2 | テキスト |
| Tracking 2 option | tracking_2_option | テキスト |
| Currency | currency | テキスト |
| Line ID | line_id | テキスト |
| Updated at | updated_at | 日時 |