Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Musili_Adebayo
Regular Visitor

How to count Occurence of a word in string in a Column, including duplicates

This attached skills screen shot is a data I got from scrapping a Job website. I want to count the skills individually like this and have them splitted. I have done this before in python with tokenisation, However, i am can't replicate the same with DAX.  I am still learning DAX i will appreciate if anyone can help me with it.

 

Musili_Adebayo_1-1641991183657.png

 

 

I will prefer the answer to be like this:

Musili_Adebayo_2-1641991217464.png

 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. You can do it in two ways, but only one is dynamic.

1. Creating a measure for each Skill counting values when CONTAINSSTRING matches the skill. (non dynamic)

2. Go to Power Query editor and transform the table. You need to Split the skill column into rows. (be aware that this will duplicate the rows for each skill). Pay attention if you are using this table for something else to build a copy or do it in the original one. Once you have that it would be an easy visual to build. Just drag the skills column and count. More details here: https://sfmagazine.com/post-entry/november-2017-excel-split-delimited-data-into-new-rows/

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
ibarrau
Super User
Super User

Hi. You can do it in two ways, but only one is dynamic.

1. Creating a measure for each Skill counting values when CONTAINSSTRING matches the skill. (non dynamic)

2. Go to Power Query editor and transform the table. You need to Split the skill column into rows. (be aware that this will duplicate the rows for each skill). Pay attention if you are using this table for something else to build a copy or do it in the original one. Once you have that it would be an easy visual to build. Just drag the skills column and count. More details here: https://sfmagazine.com/post-entry/november-2017-excel-split-delimited-data-into-new-rows/

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Greg_Deckler
Super User
Super User

@Musili_Adebayo You can split the column on the / charater in Power Query Editor and then unpivot the resulting columns.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.