SSRS Abs Function

The SSRS Abs function is a Mathematical function that returns the absolute positive value of a single-precision floating-point number. The syntax of the Abs function to return the absolute value of a numeric field is as shown below.

=Abs(-10.50)
=Abs(Fields!PositiveNegative.Value)

To demonstrate the Reporting Services Abs function, we use the Products table below, which has 14 records. The image shows the records in the table report; the result is in an empty column.

Source Table

SSRS Abs function Example

For this, right-click the textbox under the Result Header and choose the Expression to open the window below. The Abs function below will find and return the absolute positive value of a floating-point number in the Service Grade column.

  1. More Functions
  2. Charts
  3. Tables
  4. Format tables
  5. SSRS
=Abs(Fields!Service_Grade.Value)
SSRS Abs Function expression to find the absolute value

Similarly, let me create one more new column to the right of Sales and name it Profit. The SSRS Abs function expression below subtracts the Product Standard Cost from the Sales Amount. In some cases, the result might be negative, and the Abs function returns a positive value.

=Abs(Fields!SalesAmount.Value - Fields!StandardCost.Value)

Please click the preview tab to see the report.

SSRS Abs Function to find the absolute positive value report preview