Skip to main content

SF-0208 · Scenario · Medium

Is it possible to create a Formula type in reports?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

Yes — Salesforce supports two kinds of formulas inside the Report Builder: Row-Level Formulas (one calculated value per record) and Summary Formulas (calculated values at group / grand-total level). Both let you compute values that don’t exist as fields on the underlying objects.

The two formula types

TypeWhere the value sitsScope
Row-Level FormulaA new column on each rowOne value per record
Summary FormulaA new cell at each grouping / grand totalAggregated value

Row-Level Formula

A formula that runs per record and shows as a column. Looks like a regular field but exists only in the report.

Row-Level Formula: Days Open
Formula: TODAY() - DATEVALUE(Case.CreatedDate)
Display: Number, 0 decimals

Returns the number of days since the Case was created — for each Case row.

Limits:

  • 1 row-level formula per report in Lightning Experience
  • Returns Number, Currency, Percent, Date, Datetime, Text
  • Can reference any field on the report

Summary Formula

A formula calculated at group level — subtotal rows and grand total — using the report’s grouping/summary metrics.

Summary Formula: Win Rate
Formula: RowCount[CLOSED_WON] / RowCount[CLOSED]
Display: Percent, 1 decimal
At every grouping: Yes

Renders a new “Win Rate” column at every grouping subtotal plus the grand total.

Limits:

  • 5 summary formulas per report
  • Can use RowCount, Sum, Average, Max, Min, Median operators
  • Reference fields with subscript syntax: AMOUNT:SUM, RowCount[StageName='Closed Won']

When to use each

  • Row-Level Formula — compute a per-record value (Days Open, Profit per Line Item, Days to Close)
  • Summary Formula — compute a per-group value (Win %, Average Days to Close, Bookings per Rep / Quota)

Row-Level Formula example

Name: Discount Amount
Formula: Opportunity.Amount * Opportunity.Discount__c / 100
Output: Currency

Summary Formula example

Name: Average Deal Size
Formula: AMOUNT:AVG
Output: Currency
At grouping: Stage, Account, Grand Total

What formulas can’t do in the report

  • Reference summary fields in row-level formulas — Row-Level runs per-row, before aggregation
  • Loop over child records — no aggregation across child rows in row-level
  • Persist outside the report — formula fields are report-only
  • Be reused in another report — re-create them, or promote to an object formula field

When to promote to an object-level formula field

If the same Row-Level Formula appears in 5+ reports, build it as a custom formula field on the object. Reusable, queryable via SOQL, and consistent.

Custom Summary Formulas in Joined reports

Joined reports support Cross-Block Summary Formulas — formulas that calculate across blocks. Same syntax with block references: Block1!AMOUNT:SUM + Block2!AMOUNT:SUM.

Common follow-ups

  • Row-level formula limit? — 1 per report in Lightning.
  • Summary formula limit? — 5 per report (10 in Joined for cross-block).
  • Can formulas reference other formulas? — Summary formulas can reference other summary formulas if their order is correct.

Verified against: Salesforce Help — Row-Level and Summary Formulas. Last reviewed 2026-05-17 for Spring ‘26.