Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
3.5k views
in Power BI by 3 3 6

Again I need to only extract characters from string in Power BI

The characters may be uppercase or lowercase and should be shown like this table

string and number Result only characters
Alex2020A1 AlexA
Sara2021A2 SaraA
Karlos2022A500 KarlosA

1 Answer

1 like 0 dislike
by 163 204 403
selected by
 
Best answer

How to extract only characters in Power BI?

To remove all numbers and show only characters in a string in Power BI, you should do the following:

Steps

  1. At the Home tab, click on "Edit Queries".

    edit queries in power bi

  2. The Power Query Editor would be Opened.
  3. From the left side, Select your table.
  4. At the Add column tab, click on Custom Column.

    create a custom column in power bi

  5. Write the below formula based on your column name.

Extract only characters using Text.Select()

You can use Text.Select() to extract only characters from a string in Power BI

= Text.Select([String],{"A".."z"})

Extract only characters using Text.Remove()

Also, You can use Text.Remove() to extract only characters from a string in Power BI

= Text.Remove([String],{"0".."9"})

Get only Upper Case characters in Power BI

= Text.Select([String],{"A".."Z"})

Get only Lower Case characters in Power BI

= Text.Select([String],{"a".."z"})

Output

Power BI Extract only characters


Download

If you don’t ask, the answer is always NO!
...