Articles in this section
Category / Section

Find the Numeric Value in the Dataset Field

Published:
Updated:

In bold reports, when dealing with datasets that have a mix of strings and numbers, users can extract and sum numeric values from dataset fields containing a combination of strings and numbers by following these steps:

  1. Use the below-mentioned expression to identify numeric values within the field.

    Expression: =IIf(IsNumeric(Fields!field1.Value), Fields!field1.Value, 0)

    This expression checks if the content of field1 is numeric. If true, it returns the numeric value; otherwise, it returns 0.

    image.png

  1. To calculate the total sum of the identified numeric values across multiple records, use this expression.

    Expression: =Sum(IIf(IsNumeric(Fields!field1.Value), Fields!field1.Value, 0))

    This expression sums up the numeric values for each record, considering only those identified as numeric.

    image.png

  2. Click Preview to see the output in the report viewer.

    image.png

  3. Click here to download the sample report.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment