Forum Discussion

hosea_chumba's avatar
hosea_chumba
Helper I
2 years ago
Solved

DAX Formula

From my customers table, I would like to check the Phone No. column and return output where any of the below is true: Blanks Phone No. digits are not 9 Phone No. with special characters However...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi hosea_chumba ,

    Please try to create a calculate column with below dax formula:

    Column =
    VAR _a = [Phone No.digits]
    VAR _b =
        IFERROR ( INT ( _a ), _a )
    RETURN
        SWITCH (
            TRUE (),
            ISBLANK ( _a ), _a,
            IFERROR ( INT ( _a ), FALSE () ), _a,
            LEN ( _a ) <> 9, _a
        )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.