Forum Discussion

RodrigoAC's avatar
RodrigoAC
New Member
4 years ago
Solved

Count words in a string and Summary

Hello everyone!

 

I need help in building a dax to count, dynamically, a specific word in a string columm.

 

I got the example in Excel:

So i will put in a bar visual to count occurrences.

 

 

I tried to create another table with the indexes i need but i just can't get through it.

 

I've seen someone with the same question as me but i just can't duplicate the rows.

Really can't figure it out.

 

Did anyone have been throught it already?

 

Thanks!

 

  • Hi RodrigoAC 

     

    1. Click on Transform Data in the ribbon to get to Power Query.

    2. Then, in the Home tab, go to Split Column and click on By Delimeter.

    3. Then, use the following criteria from below screenshot:

     

    4. Close and Apply.

    5. Now just drag the Column with the words into the table.

    6. Do the same as step 5 and then select "Count" on the second Column you brought in to give you the count of each.

     

    Hope that helps 🙂

    Theo

     

     

4 Replies

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi RodrigoAC 

     

    1. Click on Transform Data in the ribbon to get to Power Query.

    2. Then, in the Home tab, go to Split Column and click on By Delimeter.

    3. Then, use the following criteria from below screenshot:

     

    4. Close and Apply.

    5. Now just drag the Column with the words into the table.

    6. Do the same as step 5 and then select "Count" on the second Column you brought in to give you the count of each.

     

    Hope that helps 🙂

    Theo

     

     

  • Thanks guys for the awsome solutions. I pointed them both as a solution for this problema since each one has a different kind of outputs and other uses.

    That was pretty straightfoward and solved my case! Thanks to TheoC  and ryan_mayu for the fast reply!

    Appreciate it!