Forum Discussion
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!
I suggest you to use PQ to get the result
1. split ocrruences by comma to rows
2. group by
pls see the attachment below
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
- ryan_mayu
Super User
I suggest you to use PQ to get the result
1. split ocrruences by comma to rows
2. group by
pls see the attachment below
- TheoC
Community 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
- RodrigoACNew Member
- ryan_mayu
Super User
you are welcome