Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Check whether characters are numeric

I have a list of shipping confirmation numbers, but some of them are entered incorrectly. I want to create a calculated column that checks for various conditions. One of those conditions is whether t...
  • Smauro's avatar
    8 years ago

    Another one, using DAX, could be:

    NumericCheck =
    VAR x = MOD ( [Shipping], 2 ) RETURN IF ( ISERROR ( x ), "Correct", "Numeric" )

    Which basically first tries to do some math with the row, and if succeeds the value is Numeric.
    This would work similarly with any math operation:

    NumericCheck2 =
    VAR x = ( [Shipping] - 2 ) RETURN IF ( ISERROR ( x ), "Correct", "Numeric" )


    I hope this helps! :)