ライブスプレッドシートで使える Xero profit and loss (by month)
Profit and loss (by month) テーブルを profit_and_loss_by_month という名前のデータソースとしてシートに追加すると、その7個の列が、関数、ピボットテーブル、グラフで使える名前になります。Sheets は、シートを開くたび、または更新するたびに Xero の組織データ から読み取ります。
このテーブルで使える関数
=data.profit_and_loss_by_month.sum(months_ago) Months agoの合計. Profit and loss (by month)のすべての行について、Months ago列を合計します。
=data.profit_and_loss_by_month.sum(months_ago, section, A2) Sectionごとのmonths ago. A2 にsectionを入力すると、その1件の合計になります。一覧の隣で下にコピーしてください。
=list.profit_and_loss_by_month(section) すべてのsection(重複なし). sectionの重複しない値を列方向に展開します。上の関数の行ラベルになります。
=data.profit_and_loss_by_month.sum(months_ago, month, ">=2026-01-01") ある日付以降. Monthが2026年1月1日以降の行のみ対象です。">="、"<"、"<>" などの条件は、一般的なスプレッドシートと同じように使えます。
=data.profit_and_loss_by_month.count(section, section, "<>") Sectionがある行. Sectionが空でない行を数えます。
=data.profit_and_loss_by_month.avg(amount) Amountの平均. avg、min、max、count、countd(重複なし)、first も sum と同じ方法で使えます。
このテーブルを使うレポート
=data.profit_and_loss_by_month.sum(profit_impact, months_ago, 0) 今月の純利益. 月次の損益計算書から取得します。months_ago が 0 なら当月、1 なら前月です。
=data.profit_and_loss_by_month.sum(profit_impact) 直近12か月の純利益. 直近12か月のローリング結果を1つのセルで表示します。
列
| 列 | 関数での名前 | 型 |
|---|---|---|
| Section | section | テキスト |
| Account | account | テキスト |
| Account ID | account_id | テキスト |
| Month | month | 日付 |
| Months ago | months_ago | 整数 |
| Amount | amount | 数値 |
| Profit impact | profit_impact | 数値 |
reportsのほかのテーブル
profit and loss (by month)を、リアルタイムで
請求書、支払、銀行取引、月次の損益が、関数、ピボット、グラフから直接読み取れるテーブルになります。金額は基準通貨で表示されます。