How to Create Row Level Formula in Salesforce Report

In the Salesforce report, when it is required to search multiple field values for one text value, then in that case we have an efficient approach to display multiple fields using one text by combining multiple field columns in a single column.

We can only create row-level formulas in Salesforce Lightning.

In this Salesforce tutorial, we are going to learn about the Row Level Formula in the Salesforce Report, in that we will see what the row level formula is and what are the uses of the row level formula. Additionally, we will see how to create the row-level formula in the Salesforce Lightning Report.

Row Level Formula in Salesforce Report

What is meant by searching multiple fields based on our text value in Salesforce?

We can have several options to search multiple fields based on our specific text value. We can add filter criteria and apply filter logic with OR filtering logic conditions as per our requirement. But using a row-level formula we can easily achieve this requirement.

What is the row-level formula in the Salesforce Report?

When there is a requirement to search multiple field values for one specific text value, then we can use a row-level formula to combine multiple fields in a single column, which we want to show in the report.

What are the uses of the row-level formula in Salesforce?

The following are the uses of the row-level formula in the Salesforce Report. –

  • We can display multiple fields in a single column.
  • When we need to search for specific text related to that text, the remaining fields will display, which we have added in that column.
  • This enables the user to narrow down our data and makes it more straightforward to analyze data. It makes our tasks easier.
See also  Contains Filter in Salesforce Report

Example of row-level formula in Salesforce?

Suppose you have many records in the report, and in those records, you may have some fields like Stage, Lead Source, and Type.

In these fields, you want to search for a specific text value. To do so, generally, we will create a filter with a contain operator on these three fields.

Then, using Filter logic, we will add OR filter logic. But this process going to be very lengthy and complicated.

One of the efficient approaches to achieve this requirement is using the row-level formula filter in Salesforce Report. In that, we combined fields in which we wanted to search text for fields, and after that when we search for a text we don’t need to use any other logic filter.

In the next section, we will understand the steps to create the row-level formula.

How to Create Row Level Formula in Salesforce Lightning Report

Using the above example, we will implement the following steps to understand how to create a row-level formula in Salesforce.

1. Go to “App Launcher” -> Search “Reports” -> Click on “Reports”.

Create Row level formula report in Salesforce

2. Then click on the “New Reports” button to create a new report.

Create Row level formula filter in Salesforce

3. Go to All category -> to select a Report Type, Search “Opportunities“, you can search on which object you want to create a report. -> Select Opportunities. -> Click on Start Report.

Apply row level formula filter in Salesforce Lightning

4. After that, click on Outline. -> Then click the dropdown arrow. -> Select Add Row-Level Formula.

Add row level formula filter in Salesforce

5. Then you will see this interface, now you need to fill up the necessary information.

  • Column Name: Here, you need to enter the label of a column that you are going to create. Here, I have given “Combine Fields“.
  • Formula Output Type: Here, you need to select based on which field you are creating the formula. On that basis, you can select the output type. Here, I have selected Text.
  • Formula: In this editor, you need to enter the logic and insert the field that you want to combine and connect them using the Concatenation operator.
TEXT(STAGE_NAME) & " , " & TEXT(LEAD_SOURCE) & " , " & TEXT(TYPE)
  • Here, I have used the “TEXT” function because picklist values do not support the filter formula directly; for that, I convert them into the “TEXT”.
  • Then insert those fields which you want to combine and use & “,” & to concatenate those fields.
  • Validate: After entering the formula, click on the Validate button to check whether the formula is correct or not.
  • Then Click on the Apply button.
how to add Row level formula filter in Salesforce

6. Here, you can see the “Combine Fields” column has been added to the report.

how add Row level formula filter in Salesforce

7. If you want to search for any value whose fields have been added in the “Combine Column” then you need to do the following –

  • Click on the “Filter” option. -> Select the field “Combine Fields” from which we will filter the values.
  • Select the operator “Contains” -> Enter the value that you want to filter. Here, I have entered “Existing Customer – Upgrade“. -> Click on the Apply button.
Apply filter row level formula in Salesforce Lightning

8. Here, you can see all records displayed that contain the Existing Customer – Upgrade text value in the fields. Here we also don’t need to apply separate filters to different fields and use OR filter logic.

How to Create Row level formula report in Salesforce

This is how we can create a row-level formula and apply it in the Salesforce report.

See also  How to Filter Report By Current User in Salesforce

Conclusion

I hope you have got an idea about applying a filter on the row level formula in Salesforce and searching multiple field values for one text. Also, we have seen what the row level formula is and what are the uses of the row level formula. Additionally, we have seen How to Create Row Level Formula in the Salesforce Lightning Report.

You may like to read: