The SSRS Val function is an interesting Conversion function that extracts and returns the number from a given string expression or the text field as a numeric value of appropriate datatype. The syntax of the Val function to extract numeric values or numbers from the string column is shown below.
=Val(Fields!Address.Value)
To demonstrate the Val function in reporting services, we use the Employee table below, which has 20 records. The image shows the records in the Table report.
SSRS Val function Example
For this, let me add a new column to the right side of the AddressLine1 column. Next, right-click the textbox under Val and choose the Expression.
It will open the below-shown expression window. The SSRS Val function expression below will extract and return the number or numeric value from the address field.
=Val(Fields!AddressLine1.Value)
Please click the preview tab to see the Val report.