cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

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
1 ACCEPTED SOLUTION
Resident Rockstar
Resident Rockstar

Hi @snowrider1799 ,

I believe there are several ways to achieve this

One of theseimage.png :

 

 

View solution in original post

2 REPLIES 2
Resident Rockstar
Resident Rockstar

Hi @snowrider1799 ,

I believe there are several ways to achieve this

One of theseimage.png :

 

 

View solution in original post

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","")))

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors