Forum Discussion

Anish76's avatar
Anish76
Frequent Visitor
3 years ago
Solved

Alphanumeric Values in column

How can I limit the column to only alphanumeric values?
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anish76 ,

     

    If you can use Power Query, it will be easy. The idea is to add column to mark whether it contains characters other than numbers and letters.

    Here's my sample data.

    if [Value] = Text.Select ( [Value],{ "a".."z", "A".."Z", "0".."9" }) then 1 else 0

    Then you can add this filter to write formulas in Power BI Desktop. For example,

    Count rows which contains numeric, alpha, and alphanumeric values = COUNTROWS(FILTER('Table',[Contain numbers and letters]=1))

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.