---
schema_version: "1"
id: a7b200f47b5b1c8d2d111b3cda09a1a7f34612506784a371b6c8747ba656f641
title: Use Raw Field Names in Query Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_explorer_formulas_raw_fields.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_explorer_formulas_raw_fields.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ef05495bedee9ac9ac990dced93675d1a97e4ce031ad6228a3d13c07da71dcb1
description: When writing compare-table formulas, you can reference measure and group (dimension) columns by name. Referencing measure and group columns by name lets you write more intuitive and easily understandable formulas. Even better, the formula editor includes nifty function and formula pickers that save you time as you enter your SAQL formulas.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Use Raw Field Names in Query Formulas

When writing compare-table formulas, you can reference measure and group (dimension) columns by name. Referencing measure and group columns by name lets you write more intuitive and easily understandable formulas. Even better, the formula editor includes nifty function and formula pickers that save you time as you enter your SAQL formulas.

You can use certain SAQL aggregate functions that require raw field names for arguments directly in the formula editor. These functions include `percentile_desc` and `percentile_cont`. You can also use the date function `daysBetween` in the formula editor.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note In a compare-table formula, when you reference columns by default column names or user-defined column aliases, you can’t use raw field names in that formula.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note You can use the date functions `year_last_day`, `quarter_last_day`, `week_last_day`, `quarter_days`, `day_in_week`, and `day_in_quarter` in the SAQL editor. Click ![CRM Analytics explorer SAQL mode button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_saql_mode_button.png) to access the SAQL editor.

See these examples for how to use SAQL functions with raw-field references in the formula editor. Also see the [Analytics SAQL Developer Guide](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-intro.html) for more information on SAQL functions.

```
sum(Amount)/100
percentile_cont(0.95) within group (order by 'LoadTime' asc)
regr_slope(Amount,Closed_On_epoch)
daysBetween(toDate(last(ModifiedDate_epoch), “yyyy-MM-dd”), now())
coalesce(sum(Amount), 0)
len(first(Description))
```