Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.
예상 시간
주제
커뮤니티에 질문하기

Evaluate Each Record in Reports with Row-Level Formulas

Learn About Row-Level Formulas

Gabriela Livingston, Ursa Major’s head of sales operations, wants a better handle on the timing of the Ursa Major Solar sales cycle. She’s got some numbers showing that opportunities are taking longer to close on average, but she isn’t sure what that means on a per opportunity basis. She’d like to see data on how many days it’s been taking for each individual opportunity to close. If she can only get that information, she’s confident that she can propose targeted actions to help tighten up the sales cycle.

No problem! Gabriela can get all the information she wants with a row-level formula. Row-level formulas let you evaluate each record in a report and provide record-specific answers.

See Record Level Results with Row-Level Formulas

Let’s show Gabriela how to add a row-level formula to an opportunity report. We’ll set up a row-level formula that calculates the number of days each opportunity takes to close.

Note

Due to the nature of sample data, this formula may result in a negative "Time to Close". To see current results, you can update the Close Date on some opportunities to be more recent than the Created Date.

  1. Create an opportunity report.
  2. Click Save.
  3. Name the report Opportunity with Formula.
  4. Click Save.
  5. From the Columns section of the Outline pane, click Down arrow | Add Row-Level Formula.
  6. From the Edit Row-Level Formula Column window, create the formula:
    1. In Column Name, enter Time to Close.
    2. In Description, enter Time to Close in Days.
    3. From Formula Output Type, select Number. Even though this formula works with date values, number is the output type needed because the formula performs subtraction and returns a number.
    4. Set Decimal Points to 0.
    5. In Formula, paste CLOSE_DATE - DATEVALUE(CREATED_DATE) 
      • CLOSE_DATE and CREATED_DATE are the API names of the Close Date and Created Date fields. Formulas work with the API names of fields, not the display names. The easiest way to enter the API name of a field is to search for it from the FIELDS menu, select it, and click Insert >.
      • Because CLOSE_DATE's data type is date and CREATED_DATE's data type is datetime, we convert the value of CREATED_DATE to the date data type with the DATEVALUE() function. The two values must have a matching data type so that we can subtract one from the other. (Datetime and date are different data types because datetime includes information about units of time smaller than a day - hours, minutes, seconds, and so on - and DATE does not.)
    1. To make sure that the formula is error-free, click Validate. If necessary, resolve errors.
    2. Click Apply.
  1. Click Save & Run.

That’s all there is to it! Now when Gabriela views the Opportunity report, she can scan the Time to Close column (the rightmost column) to see the number of days that each opportunity took to close.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기