---
schema_version: "1"
id: 528be04561fe56459239fa8f59dcfce33009452ae77cea6c8f1509dd4f02ee3c
title: abs(n)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-functions-math-abs.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-math-abs.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2c371df283c805cb515b5a434ba2e9950e78a75375cf85bb56e38a56d3ca9f9c
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# abs(n)

Returns the absolute number of _n_ as a numeric value. _n_ can be any real numeric value in the range of -1e308 \<= _n_ \<= 1e308. This function can only be used in a `foreach` statement.

## Example

```nolang
q = foreach q generate abs(pct_change) as pct_magnitude;
```
