Custom Spend Table

The Custom Spend table provides daily allocations for custom expenses in Cost Settings > Custom Expenses. One row per expense allocation per event date, only within each expense's date range.

📋

Table Guide

What You Can Answer With This Table

  • How much custom expense was incurred, by category, channel, or campaign? — use amount, category, channel
  • Which of my custom expenses are contributing to ad spend, and how much? — use is_ad_spend, amount
  • What are my variable expenses, and how much did each cost over a time period? — use metric, rate, amount, event_date

Before You Query

  • Required field: event_date
  • Selecting event_hour returns hourly allocations instead of daily rows.

When to Use a Different Table

  • Use Orders table when you need custom_expenses attached to individual orders through Enrich Orders Data. The Custom Spend table is for store-level Cost Settings rules and dated expense allocations.

View the full Triple Whale Data Ontology →


Dimensions

Dimensions are immutable properties that can be used for grouping data.

TitleIDTypeDescription
Event Hourevent_hourstring

The hour of the day the custom expense was incurred, according to a 24-hour clock. Based on the shop time zone at the moment of the event (or the user time zone, if no sales platform is connected).

Example values: 07, 16, 21

Event Dateevent_datedateThe date the custom expense was incurred. Based on the shop time zone at the moment of the event (or the user time zone, if no sales platform is connected).
Event Dayevent_date.daydateThe day the event occurred. Derived from event_date.
Event Weekevent_date.weekdateThe Sunday of the week during which the event occurred. Derived from event_date.
Event Monthevent_date.monthdateThe month during which the event occurred. Derived from event_date.
Event Quarterevent_date.quarterdateThe first month of the quarter during which the event occurred. Derived from event_date.
Event Yearevent_date.yeardateThe year during which the event occurred. Derived from event_date.
Campaign IDcampaign_idstring

The name or ID of the campaign the custom expense is associated with.

Note: This may match an existing campaign ID in an integrated ad platform. Edit in Cost Settings > Custom Expenses.

Example values: 23852438666180053, 531011533, 20620285829

Custom Expense Categorycategorystring

The category of the custom expense. Edit in Cost Settings > Custom Expenses.

Example values: Ad Spend, Cashback Booked, Returns Estimate

Channelchannelstring

The channel or platform related to the custom expense.

Note: This may match an existing integrated ad channel. Edit in Cost Settings > Custom Expenses.

Example values: facebook, social, microsoft

Is Ad Spendis_ad_spendboolean

True if the custom expense is considered an advertising expenditure. Edit in

Cost Settings

Custom Expenses.

Is Recurringis_recurringboolean

True if the custom expense is recurring. Edit in Cost Settings > Custom Expenses.

Note: Only relevant for fixed expenses. NULL for variable expenses.

Variable Expense Base Metricmetricstring

The metric upon which the variable custom expense will be based. Edit in Cost Settings > Custom Expenses.

Note: Only relevant for variable expenses. NULL for fixed expenses.

Example values: Blended Ads, COGS, Orders

Variable Expense Rateratestring

The rate applied to the base metric to calculate the custom expense. Edit in Cost Settings > Custom Expenses, in the percent field.

Note: Only relevant for variable expenses. NULL for fixed expenses.

Example value: 0.02

Shop IDshop_idstring

The unique ID of the shop (often corresponds to the shop domain). Can be used to group or filter data by shop in multi-store reports.

Example values: example-US.myshopify.com, example-EU.myshopify.com

Shop Nameshop_namestring

The name of the shop. Can be used to group or filter data by shop in multi-store reports.

Example values: example-US, example-EU

Custom Expense Titletitlestring

The title of the custom expense. Edit in Cost Settings > Custom Expenses.

Example values: Podcast, Influencer

Measures

Measures are numeric fields that can be aggregated and/or combined to calculate new metrics.

TitleIDTypeDescription
Custom Expense Amountamountnumeric

The amount of the expense. By default shown in the shop's currency.

Note: For fixed expenses, the amount is set directly by the seller; for variable expenses, the amount is calculated based on the base metric and rate set by the seller, combined with shop prices from the sales, ad, or email/SMS platform (e.g. Shopify, Facebook, Klaviyo). Edit in Cost Settings > Custom Expenses.

Derived

Derived fields are metrics that are pre-calculated using multiple measures or advanced formulas.

TitleIDTypeDescription
Custom Ad Spendcustom_ad_spendformulaThe total amount of custom expenses marked as ad spend.
Custom Expenses Excluding Ad Spendcustom_excl_ad_spendformulaThe total amount of custom expenses, excluding those marked as ad spend.