Forum Discussion

snowrider1799's avatar
6 years ago
Solved

Search for repeated alphabet in a string (column)

Hello,

 

I would like to know if there's any method to count the repeat alphabet in a string. 

 

For example, I want to get "a" from a column, repeat for how many times. Is there a way to do it? Thank you.

 

NameCount 
Melissa Sandy2
Albert Adam3
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi snowrider1799 ,

    I believe there are several ways to achieve this

    One of these :

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi snowrider1799 ,

    I believe there are several ways to achieve this

    One of these :

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      others way cooldbe be to add a column with one of the following rules:

       

      • List.Count(Text.SplitAny([Name],"aA"))-1)
      • Text.Length([Name])-Text.Length(Text.Replace(Text.Lower([Name]),"a","")))