Working with Data: All the calculations you need t
  • Introduction
  • What is this book?
  • How to Use this Book
  • Document Notes
  • Authors' Thanks
  • Strings
    • Concatenate
    • Split
    • Length
    • Slice
    • Trim
    • Contains
    • Match
    • Replace
    • Upper/Lower Case
  • Numbers
    • Sum
    • Average
    • Roll Ups
    • Round
    • Floor
    • Power
    • Square Root
    • Absolute
  • Dates
    • Date Difference
    • Age
  • Logical
    • Logical Operators
    • If
    • Case / Switch
    • Is Null/Empty
  • General
    • Count
    • Filter
    • Sort
    • Lookup/Join
    • Variables
    • Convert Type
  • Appendix
    • DateTime Parts
    • Helpful Resources
Powered by GitBook
On this page
  1. Numbers

Absolute

PreviousSquare RootNextDates

Last updated 5 years ago

Was this helpful?

CtrlK
  • Excel
  • Tableau
  • Alteryx
  • OrgVue
  • tSQL
  • Python

Was this helpful?

Absolute calculations keep the value of a number but ignoring the sign. This is useful in creating normalised scores, e.g. when analysing departure from a target value regardless of direction.

Excel

=~ABS!~(‹cell›)

=ABS(4) // Returns 4

=ABS(A1) // -13.6 -> 13.6

Tableau

~ABS!~(‹measure›) OR ~ABS!~(‹number›)

ABS([Sales Gap]) // -13.6 -> 13.6

ABS(4) // Returns 4
ABS([Profit])

Alteryx

~ABS!~(‹measure›) OR ~(‹number›)

ABS([Sales Gap]) // -13.6 -> 13.6

ABS(4) // Returns 4

OrgVue

~Math.abs!~(‹number›) OR ~Math.abs!~(‹measure›)

Math.abs(node.sales); // -13.6 -> 13.6

Math.abs(4); // Returns 4

tSQL

~ABS!~(‹field›)

SELECT ABS(Profit)
FROM SalesData

Python

~abs!~(‹number›)

abs(salesGap-3.6); // -13.6 -> 13.6

abs(4); // Returns 4
abs(profit);

NB. The above example assumes a variable has been declared for salesGap. For more information, go to the chapter General > Variables.