top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

What is cross object formula? How to use cross object formula in reports and dashboard with scenario

A cross-object formula is a formula that references fields from two or more related objects in Salesforce. This type of formula allows users to calculate and display data from multiple objects on a single record or report.


To use a cross-object formula in a report or dashboard, follow these steps:


Create the cross-object formula field: In Salesforce, go to the object manager and select the object that you want to create the cross-object formula field for. Click on "Fields & Relationships" and then click "New". Select "Formula" as the field type and then select "Cross-Object Formula" as the formula return type. You can then define the formula using the formula editor.


Add the cross-object formula field to a report or dashboard: Once you have created the cross-object formula field, you can add it to a report or dashboard. In the report or dashboard editor, add the cross-object formula field to the report or dashboard as you would any other field.


Here is a scenario where a cross-object formula can be used in a report or dashboard:


Let's say you have two objects in Salesforce: Accounts and Opportunities. Accounts have a custom field called "Total Revenue" and Opportunities have a custom field called "Expected Revenue". You want to create a report that shows the total expected revenue for each account, which is the sum of all expected revenue values for the opportunities associated with that account.


To accomplish this, you can create a cross-object formula field on the Account object that sums the "Expected Revenue" values from the related Opportunities. The formula might look something like this:

SUM(Opportunities__r.Expected_Revenue__c)

Once you have created the cross-object formula field, you can add it to a report or dashboard to show the total expected revenue for each account. This report or dashboard can be used to analyze sales performance by account and to identify areas for improvement.


Here is a process diagram for using a cross-object formula in a report:


Identify the objects and fields involved: In this scenario, we are working with the Accounts and Opportunities objects, and the custom fields "Total Revenue" on the Accounts object and "Expected Revenue" on the Opportunities object.


Create the cross-object formula field: Use the formula editor to create a cross-object formula field on the Accounts object that references the "Expected Revenue" field on the Opportunities object. The formula should sum the "Expected Revenue" values for all related Opportunities, as shown in the previous example.


Add the cross-object formula field to the report: In the report editor, add the cross-object formula field to the report as a column. The report should now display the total expected revenue for each account, calculated using the cross-object formula field.


Customize the report as needed: Add filters, groupings, and other customizations to the report as needed to meet your reporting requirements.


Save and share the report: Once you have customized the report to your satisfaction, save it and share it with other users as needed. The report can be scheduled to run automatically and can be exported to various formats, such as Excel or PDF, for further analysis.


Here is a visual representation of the process diagram:


+------------------------+

| Identify objects/fields |

+------------------------+

|

v

+------------------------+

| Create cross-object |

| formula field |

+------------------------+

|

v

+------------------------+

| Add cross-object |

| formula field to report |

+------------------------+

|

v

+------------------------+

| Customize report |

+------------------------+

|

v

+------------------------+

| Save and share report |

+------------------------+


568 views0 comments

Recent Posts

See All
bottom of page