Calculated Insight: Count Of Total Cases By Vehicle
The Count Of Total Cases By Vehicle calculated insight aggregates the number of customer
cases for a specific vehicle, and groups the cases by year, quarter, and month. The insight
considers cases in all statuses and provides an overall understanding of customer
satisfaction.
Required Editions
Available in: Enterprise, Unlimited, and Developer
Editions
Here’s a breakdown of the logic.
Expression
Description
SELECT COUNT(ssot__Case__dlm.ssot__Id__c) AS
TotalCases__c
Extracts the IDs of all cases, calculates the total count, and assigns it an
alias TotalCases__c.
ssot__Vehicle__dlm.ssot__VehicleIdentificationNumber__c AS VIN__c
Extracts the vehicle identification number from the Vehicle object and assigns it
an alias VIN__c.
quarter(ssot__Case__dlm.ssot__CreatedDate__c) as
Quarter__c
Extracts the quarter information from the Created Date of the case records and
assigns it an alias as Quarter__c.
year(ssot__Case__dlm.ssot__CreatedDate__c) as
Year__c
Extracts the year information from the Created Date of the case records and
assigns it an alias as Year__c.
month(ssot__Case__dlm.ssot__CreatedDate__c) as
Month__c
Extracts the month information from the Created Date of the case records and
assigns it an alias as Month__c.
FROM ssot__Case__dlm JOIN ssot__Vehicle__dlm ON
(ssot__Case__dlm.ssot__AccountId__c =
ssot__Vehicle__dlm.ssot__CurrentOwnerId__c)
Joins the Vehicle and Case objects by matching the Account ID field on a case
record to the Current Owner ID field on a vehicle record.
GROUP BY VIN__c, Quarter__c, Year__c,
Month__c
Groups the results by the vehicle identification number, month, quarter, and
year.
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.