DAX function
ABS — DAX function reference
Absolute value.
Syntax
dax
ABS(<number>)
Examples
dax
ABS([Variance])
→ A number
dax
RANKX(ALL(Product), ABS([Budget Variance]))
→ Ranks products by the size of their variance regardless of over/under direction
dax
IF(ABS([Actual] - [Budget]) > [Budget] * 0.1, "Out of tolerance", "OK")
→ Flags variances beyond 10% in either direction
Common mistakes & gotchas
- ABS() strips the sign entirely, so SUM of already-absoluted values is not the same as ABS(SUM of signed values) — decide whether you want net or gross variance before wrapping in ABS, since summing absoluted values inflates the total compared to summing signed values first.
- Applying ABS early in a calculation chain can mask a genuine sign-based bug upstream (e.g., a variance that should be negative appearing positive) — use it for display/ranking, not as a substitute for validating sign logic.
Related DAX functions
From Math & statistics