---
schema_version: "1"
id: 5cbc4466ec24c49d4ae98a10c08fa04daadb0b01d507f79737ab3eb4e3a5ccf4
title: "Calculated Insight: Vehicle Lifetime Value"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/auto_ci_vehicle_sales.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.auto_ci_vehicle_sales.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ec660d5297aec7c5becf3a826bf041066f52f26ef53cef710695530dfc65af44
description: The Vehicle Lifetime Value calculated insight aggregates the lifetime revenue generated from all sales and service activities for a specific vehicle. The lifetime value of a vehicle includes the sales and service activities of the original equipment manufacturer and the dealerships.
products:
  - Automotive
release: "264"
---
# Calculated Insight: Vehicle Lifetime Value

The Vehicle Lifetime Value calculated insight aggregates the lifetime revenue generated from all sales and service activities for a specific vehicle. The lifetime value of a vehicle includes the sales and service activities of the original equipment manufacturer and the dealerships.

### 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 Vehicle_Sales_Detail__cio.VIN__c as VIN__c` | Extracts the vehicle identification number from the Vehicle Sales Detail calculated insight and assigns the value an alias `VIN__c`. |
| `SUM(Vehicle_Sales_Detail__cio.DealerSalesAmount__c + Vehicle_Sales_Detail__cio.DirectSalesAmount__c + Vehicle_Sales_Detail__cio.PartsTxnAmount__c + Vehicle_Sales_Detail__cio.RepairOrderAmount__c) as TotalAmount__c` | Calculates the sum of the dealer sales amount, direct sales amount, parts transaction amount, and repair order amount for each vehicle and assigns it an alias `TotalAmount__c`. |
| `FROM Vehicle_Sales_Detail__cio` | Specifies the source calculated insight that the total amount is derived from. |
| `GROUP BY VIN__c` | Groups the results by `VIN__c`, aggregating the revenue for each unique vehicle. |
| `HAVING SUM(Vehicle_Sales_Detail__cio.DealerSalesAmount__c + Vehicle_Sales_Detail__cio.DirectSalesAmount__c + Vehicle_Sales_Detail__cio.PartsTxnAmount__c + Vehicle_Sales_Detail__cio.RepairOrderAmount__c) > 0` | Filters the grouped results to include only the vehicles where the total revenue is greater than 0. |