---
schema_version: "1"
id: 44e205709aeac987eff049ba313d062e51e9212daf3546f33716806b0d3ac8de
title: "Calculated Insight: Vehicle Revenue From Direct Sales"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/auto_cicalculated_insight_vehicle_revenue_from_direct_sales.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.auto_cicalculated_insight_vehicle_revenue_from_direct_sales.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9a1f7f2bfdf15a7fb6c9628343f7d837ff3e3ee6d5027a4afec0cf30419bec44
description: The Vehicle Revenue From Direct Sales calculated insight aggregates the lifetime revenue generated for a specific vehicle by the original equipment manufacturer. The vehicle revenue from direct sales considers the sales orders for a specific vehicle.
products:
  - Automotive
release: "264"
---
# Calculated Insight: Vehicle Revenue From Direct Sales

The Vehicle Revenue From Direct Sales calculated insight aggregates the lifetime revenue generated for a specific vehicle by the original equipment manufacturer. The vehicle revenue from direct sales considers the sales orders for a specific vehicle.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

Here’s a breakdown of the logic.

 
| Expression | Description |
| --- | --- |
| `SELECT SUM(ssot__RebateClaim__dlm.ssot__ClaimAmount__c) AS DealerAmount__c, ssot__Vehicle__dlm.ssot__VehicleIdentificationNumber__c AS VIN__c` | Applies the SUM aggregation function to the Claim Amount field in the Rebate Claim object and assigns it an alias `DealerAmount__c`. Extracts the Vehicle Identification Number field from the Vehicle object and assigns it an alias `VIN__c`. |
| `FROM ssot__RebateClaim__dlm JOIN ssot__Vehicle__dlm ON (ssot__RebateClaim__dlm.ssot__VehicleId__c = ssot__Vehicle__dlm.ssot__Id__c)` | Joins the data in the Rebate Claim and Vehicle objects by matching the Vehicle ID field on the Rebate Claim object to the ID field on the Vehicle object. |
| `GROUP BY VIN__c` | Groups the results by `VIN__c`, aggregating the dealer sales for each unique vehicle. |