Xero connector: datasets and metric definitionsBeta
Bring in the profit and loss (with your budget), balance sheet, bank summary, general ledger, and open invoices and bills. Matches Xero reports. Updates daily.
When you connect Xero, Quiriz imports the datasets below and adds the metric definitions to Company Context, the one place your company’s definitions live. Every answer that uses one of these metrics uses the same definition, in the app, in Slack and in the Excel, Sheets, PowerPoint, Slides, Word and Docs add-ins. An admin can edit any of them.
DatasetsMetric definitionsQuestionsFAQ
Datasets
| Dataset | What it holds |
|---|---|
| [Xero] Profit and loss | One row per account per month for this fiscal year and the two before it, matching the Xero Profit and Loss report. amount is as Xero shows it; profit_effect is + for income, - for costs, so SUM(profit_effect) is net income. pl_level: 1 income, 2 cost of goods sold, 3 expenses, 4 other income. budget_amount and budget_profit_effect come from the organization's overall budget in Xero and are empty when it has none or for months it does not cover (a budgeted account with no actual that month has amount 0). basis is Accrual (Xero reports default to accrual; the cash basis is not used).14 columnsmonth, fiscal_year, account_id, account_code, account_name, account_path, account_type, section, pl_level, basis, amount, profit_effect, budget_amount, budget_profit_effect |
| [Xero] Balance sheet | One row per account per month-end (today for the current month) for this fiscal year and the two before it, matching the Xero Balance Sheet. Balances are points in time: never add month-ends together. is_cash = bank accounts; is_latest = the newest month-end. Current Year Earnings has no account id. basis is Accrual (Xero reports default to accrual; the cash basis is not used).12 columnsmonth_end, fiscal_year, account_id, account_code, account_name, account_path, account_type, section, is_cash, is_latest, basis, balance |
| [Xero] Bank summary | One row per bank account per month for this fiscal year and the two before it, from Xero's Bank Summary: opening balance, cash received, cash spent and closing balance. Cash received and spent include transfers between the organization's own bank accounts. For total cash over time use closing_balance at each month, never summed across months.8 columnsmonth, fiscal_year, account_id, account_name, opening_balance, cash_received, cash_spent, closing_balance |
| [Xero] Ledger | One row per journal line, for this fiscal year and the two before it (it may start later when the ledger line cap is reached: check MIN(txn_date)). Double entry: every journal appears once per account it touches (an invoice has an Income line and a receivables line, both with the customer filled), so never sum amount across sections. amount on income and expense accounts is in the P&L's sign; on balance sheet accounts it is the signed journal amount (debit +, credit -). Revenue by customer = SUM(profit_effect) WHERE pl_level = 1, grouped by customer. Spend by vendor = SUM(amount) WHERE pl_level IN (2, 3), grouped by vendor. customer is filled for sales invoices and received money, vendor for bills and spent money; credit notes, payments and manual journals leave both blank, so totals by customer can be below Revenue. name is the customer or vendor; memo is the journal line description; class and location are the first two tracking category options. For income and expense accounts, SUM(profit_effect) by month equals the Profit and loss dataset. basis is Accrual (Xero reports default to accrual; the cash basis is not used).22 columnstxn_date, month, fiscal_year, txn_id, txn_type, doc_num, account_id, account_code, account_name, account_path, account_type, section, pl_level, name, customer, vendor, class, location, memo, basis, amount, profit_effect |
| [Xero] Open invoices | Every sales invoice with an amount still due today (AUTHORISED invoices), in the base currency (foreign-currency invoices converted at the invoice rate). A snapshot of today: no date filter applies. days_past_due is 0 until the due date. Credit notes, overpayments and prepayments that are not yet applied are not netted, so totals can differ from the Xero aged reports, which net them.9 columnscustomer, txn_type, doc_num, txn_date, due_date, days_past_due, aging_bucket, amount, open_balance |
| [Xero] Open bills | Every bill with an amount still due today (AUTHORISED bills), in the base currency. A snapshot of today: no date filter applies. days_past_due is 0 until the due date. Credit notes, overpayments and prepayments that are not yet applied are not netted, so totals can differ from the Xero aged reports, which net them.9 columnsvendor, txn_type, doc_num, txn_date, due_date, days_past_due, aging_bucket, amount, open_balance |
Metric definitions
Each metric is a total over the period you ask about. A metric built from other metrics, such as a rate, divides the totals for the whole period; it does not average daily rates. Dated by is the date column that decides which period a row belongs to.
[Xero] Profit and loss
| Metric | How it is calculated | Dated by | Notes |
|---|---|---|---|
| Xero revenue | Sum of amount, where pl_level = 1 | month | Income accounts, by month, accrual basis. These are the books; Shopify's Net sales, when connected, is the store's own figure. |
| Xero cost of goods sold | Sum of amount, where pl_level = 2 | month | Cost of sales (direct cost) accounts, by month. |
| Xero gross profit | Sum of profit_effect, where pl_level <= 2 | month | Revenue minus cost of goods sold, by month. |
| Xero gross margin | Xero gross profit ÷ Xero revenue | month | Gross profit divided by revenue, as a decimal (0.42 = 42%). |
| Xero operating expenses | Sum of amount, where pl_level = 3 | month | Operating expense accounts, by month (not cost of goods sold, not other income). |
| Xero operating income | Sum of profit_effect, where pl_level <= 3 | month | Gross profit minus operating expenses, by month. |
| Xero net income | Sum of profit_effect | month | Every income and expense account, by month: Xero's net profit. |
| Xero net margin | Xero net income ÷ Xero revenue | month | Net income divided by revenue, as a decimal. |
| Xero budget revenue | Sum of budget_amount, where pl_level = 1 | month | Budgeted income, by month, from the organization's overall budget in Xero. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months. |
| Xero budget operating expenses | Sum of budget_amount, where pl_level = 3 | month | Budgeted operating expenses, by month. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months. |
| Xero budget net income | Sum of budget_profit_effect | month | Budgeted net income (budgeted income minus budgeted costs), by month. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months. |
| Xero revenue vs budget | Xero revenue − Xero budget revenue | month | Actual revenue minus budgeted revenue, by month; negative is under budget. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months. |
| Xero net income vs budget | Xero net income − Xero budget net income | month | Actual net income minus budgeted net income, by month; negative is under budget. Budget totals over a window wider than the budget's own months mix budgeted and unbudgeted months. |
[Xero] Balance sheet
| Metric | How it is calculated | Dated by | Notes |
|---|---|---|---|
| Xero cash balance | Sum of balance, where is_cash = 1 AND is_latest = 1 | Today’s snapshot | Bank account balances at the newest month-end (today, for the current month). For cash over time, group [Xero] Balance sheet by month_end; never add month-ends together. |
[Xero] Bank summary
| Metric | How it is calculated | Dated by | Notes |
|---|---|---|---|
| Xero cash received | Sum of cash_received | month | Money received into bank accounts, by month, from Xero's Bank Summary. |
| Xero cash spent | Sum of cash_spent | month | Money paid out of bank accounts, by month, from Xero's Bank Summary. |
| Xero net cash movement | Xero cash received − Xero cash spent | month | Cash received minus cash spent, by month (bank transfers between the organization's own accounts net to zero). |
[Xero] Open invoices
| Metric | How it is calculated | Dated by | Notes |
|---|---|---|---|
| Xero open receivables | Sum of open_balance | Today’s snapshot | What customers owe today, from the open invoices list, in the base currency. |
| Xero overdue receivables | Sum of open_balance, where days_past_due > 0 | Today’s snapshot | Open invoice balances past their due date today. |
[Xero] Open bills
| Metric | How it is calculated | Dated by | Notes |
|---|---|---|---|
| Xero open payables | Sum of open_balance | Today’s snapshot | What the organization owes vendors today, from the open bills list, in the base currency. |
Questions to ask
- What was our gross margin by month this year?
- Which expense accounts grew the most compared with last year?
- How does net income year to date compare with the same period last year?
- How did revenue and net income compare with budget by month this year?
- How has our cash balance changed month by month?
- How much cash came in and went out each month?
- Who owes us the most, and how overdue is it?
- Which customers brought in the most revenue last quarter?
Related guides
- Utilization, Realization and Project Margin from Harvest
- Claude for Accounting: What It Does Well With Your Books, and What Should Check It
Ask Xero in plain words
Try the questions on sample data with no signup, then connect Xero read-only and ask your own.
Try Quiriz free →Frequently asked questions
Does Quiriz change anything in Xero?
How often does the Xero data refresh?
Can I change how a metric is calculated?
Can I combine Xero with other sources?
All connectors: Quiriz connectors. Definitions on this page are generated from the product’s own connector code.