# SPDX-License-Identifier: Apache-2.0
smf: "0.1"
kind: MetricContract
id: product.gross_margin
version: 1
name: Product Gross Margin
measures: { concept_ref: concept.gross_margin }
perspective: perspective.gross_margin.product
formula: (product_revenue - landed_cost_of_goods) / product_revenue
grain: order_line
valid_dimensions: [fiscal_month, product_category, store]
filters: [line_type = product]
exclusions: [installation_labor, warranty_reserves]
time_semantics: { calendar: fiscal, basis: ship_date }
additivity: non_additive
built_on: [odcs:sales_order_lines, odcs:landed_cost]
owner: Product Line Lead
certified_for: [product_reviews, pricing_decisions]
comparability:
  not_comparable_with: [services.gross_margin]
  can_be_combined: false
  notes: Cost includes freight-in and duties; service margin cost is labor-based. Do not average the two.
status: standard
---
smf: "0.1"
kind: MetricContract
id: services.gross_margin
version: 1
name: Service Gross Margin
plain_words: "Of every dollar we bill for installation and maintenance, how much is left after paying for the labor, subcontractors and parts it took to deliver."
measures: { concept_ref: concept.gross_margin }
perspective: perspective.gross_margin.service
formula: (service_revenue - (technician_labor + subcontractor_cost + parts_used)) / service_revenue
grain: work_order
valid_dimensions: [fiscal_month, service_type, technician_team]
filters: [line_type = service]
inclusions: [installation_work_orders, maintenance_work_orders]
exclusions: [product_sales]
time_semantics: { calendar: fiscal, basis: work_order_completed_date }
additivity: non_additive
built_on: [odcs:work_orders, odcs:job_costing]
owner: Services Lead
certified_for: [services_reviews, staffing_decisions]
not_certified_for: [board_reporting, external_reporting]
comparability:
  not_comparable_with: [product.gross_margin]
  can_be_combined: false
  notes: Labor-based cost. Compare over time within services, not against product margin.
status: standard
effective_from: 2026-01-01
---
smf: "0.1"
kind: MetricContract
id: finance.consolidated_gross_margin
version: 2
name: Consolidated Gross Margin
measures: { concept_ref: concept.gross_margin }
perspective: perspective.gross_margin.consolidated
formula: (total_revenue - total_cost_of_revenue) / total_revenue
grain: general_ledger_period
valid_dimensions: [fiscal_period]
time_semantics: { calendar: fiscal, basis: recognized_date }
additivity: non_additive
built_on: [odcs:general_ledger]
owner: Controller
certified_for: [board_reporting, external_reporting]
comparability:
  not_comparable_with: [product.gross_margin, services.gross_margin]
  can_be_combined: false
  notes: Broader than product and service. Computed from totals, not the average or sum of their margins. Its cost definition can differ (for example reserves or freight), so the three do not reconcile by arithmetic. The Controller owns the reconciliation.
status: standard
---
smf: "0.1"
kind: Binding
subject: finance.consolidated_gross_margin@v2
implementation: { platform: power_bi, ref: "Finance Model / [Gross Margin %]" }
conformance_status: conformant
---
smf: "0.1"
kind: Binding
subject: product.gross_margin@v1
implementation: { platform: dbt, ref: "metrics.product_gross_margin" }
expression_snapshot:
  text: (product_revenue - landed_cost_of_goods) / product_revenue
  sha256: 170037c59f088976a7416c969b1617527e13fcd1dc3a81019d3106fa4a7da814
  captured_on: 2026-10-09
conformance_status: conformant
---
smf: "0.1"
kind: Binding
subject: product.gross_margin@v1
implementation: { platform: ossie, ref: "sales_analytics/metrics/product_gross_margin" }
expression_snapshot:
  text: (SUM(order_lines.product_revenue) - SUM(order_lines.landed_cost_of_goods)) / SUM(order_lines.product_revenue)
  sha256: eb9475197f844c6cbf36b26528111818268eab92596a2f3fab3d149152768a9b
  captured_on: 2026-10-09
conformance_status: untested
---
smf: "0.1"
kind: Binding
subject: services.gross_margin@v1
implementation: { platform: spreadsheet, ref: "Services KPI workbook / GM tab" }
conformance_status: untested
