A calculated field is a new metric or dimension you create with a formula built from data a report already has, such as dividing ad spend by the number of leads to show cost per lead. The term is most common in Looker Studio, but spreadsheets, GA4 and most reporting tools offer the same idea under similar names.
How a calculated field works
You write a formula that refers to existing fields, and the tool works out the answer for every row and every total in a chart. Looker Studio lets you add one in two places: on the data source, so every report built on that source can reuse it, or on a single chart, where it exists only in that chart. GA4 has its own version, called calculated metrics, created in Admin under custom definitions, with a small limit on how many each standard property can hold.
Most calculated fields fall into three groups:
- Ratios. SUM(Cost) / SUM(Conversions) gives cost per conversion; revenue divided by cost gives return on ad spend.
- Groupings. A CASE statement can sort campaign names into Brand, Generic and Competitor by matching patterns in the name, so a sprawling account reads as three lines.
- Clean-ups. Removing VAT from revenue, trimming a full URL to its page path, or merging facebook.com, m.facebook.com and l.facebook.com into one source.
The formula language resembles spreadsheet functions, with CASE, IF, REGEXP_MATCH, IFNULL, text functions and date functions doing most of the work.
Why it matters
The figures a business actually runs on are rarely the ones a platform shows by default. A London accountancy practice cares about cost per qualified enquiry, not clicks. A VAT-registered online shop wants return on ad spend worked out on revenue after VAT, because that is the money it keeps. Calculated fields put those numbers straight onto the dashboard, instead of someone rebuilding them in a spreadsheet every month, which is where copy-and-paste errors creep in.
They also put channels on the same footing. When Google Ads, Meta and email all feed one report, a calculated field can apply one definition of a lead, or one custom channel grouping, to all of them, so you compare like with like.
Common mistakes
- Averaging ratios. If you work out conversion rate on each row and then average the rows, a campaign with ten clicks counts as much as one with ten thousand. Divide the totals instead, SUM(Conversions) / SUM(Clicks), so the overall figure is weighted correctly.
- Ignoring division by zero. A campaign with no conversions returns a blank, which can throw out sorting and totals. Wrap the formula so it shows zero, or a clear “no conversions” label, instead.
- Removing VAT at one rate. Dividing revenue by 1.2 works for goods at the 20% standard rate, but children’s clothes, books and most food are zero-rated in the UK. A mixed catalogue needs the VAT figure from the shop platform, not a blanket formula.
- Unexplained names. Six months later nobody remembers why “Leads (adj)” differs from “Leads”. Name fields plainly and put the definition in the field’s description.
- Calculating on a faulty blend. When a blended data source joins tables on the wrong key, rows are duplicated and every figure the formula touches is inflated.
How to act on it
List the five or six numbers you make decisions on each month and check whether your reports show each one directly. For any that are missing, write the definition in plain English first, for example “cost per lead equals Google Ads cost divided by form submissions plus calls longer than 60 seconds”, and agree it with whoever reads the report. Then build the field on the data source so every chart uses the same version.
Before anyone relies on it, test the field against a figure you can work out by hand for one week and one campaign. If the two disagree, check the field’s aggregation setting and any chart filters first; those cause most mismatches.
When paid channels are run against one cost-per-lead or ROAS target, as in performance marketing, that agreed formula effectively is the target. Settle it before the first report, not after the first disagreement about whether the campaigns are working.
