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
Available in: Enterprise, Unlimited, and Developer
Editions
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.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.