cancel
Showing results for 
Search instead for 
Did you mean: 

How many times a word occurs in a cell

633 Views
Highlighted
Super User
Super User

How many times a word occurs in a cell

 

This is the DAX formula

 

 

DAX formula =
PATHLENGTH ( SUBSTITUTE ( [ColumnName], "Word_to_search", "|" ) ) - 1

 

 

This is the M formula

 

 

=List.Count(Text.Split([ColumnName], "Word_to_search")) - 1


Below is the illustration of above formulas

 

 

No_of_times.png