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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Count items from a splitted string

Hello,

 

I have some ideas for my report, but sadly, with my limited capability, I cannot visualize it. I want to count the skills most popular for each department and have a bar chart for that. The original data structure is in the below form. 

 

I would like to somehow visualize/count the number of staff in department A has skill AI and all that. 

 

Your help is much appreciated. 

 

Thank you 

 

Best,

ihaveapaincake

 

DepartmentStaffSkills
AJohnAI, ML
ALilyJava, Angular, Cloud
BMaxJava, Angular
CRobertMobile
DTomReact JS
ECristJava, Angular, ReactJs, Python, Jenkins
FTaarAngular, NodeJs
5 REPLIES 5
tamerj1
Super User
Super User

Hi @Anonymous 

let's say that you have a disconnected table 'Skills' that contains all the skills. Such filter/slicer table would be required. You can create manually or using dax (let me know if you need help in that). 
now you can create a measure as follows 

Count =
COUNTROWS (
FILTER ( 'Table', CONTAINSSTRING ( 'Table'[Skills], MAX ( Skills[Skills] ) ) )
)

Then place the measure in the y-axis of a stacked bar chart the drag 'Table'[Department] to x-axis and Skills[Skill] into the legend 

Anonymous
Not applicable

Hello,

 

That would be nice if you would suggest me how to create the Skills table. I am a novive with PowerBI and DAX, so your help is much appreciated.

 

Also, can I ask why we use MAX(Skills[Skills]) for counting?

And I do not get the concept of creating measure. How will Power BI process when you stack the measure, skills and department name into such chart?

 

Thanks a lot!!!!!!!!!!!!!!!!!!!!!

@Anonymous 

You can manually insert it or just type it in excel and then import it. Please let me know if you're still facing problems. 

Anonymous
Not applicable

I mean that all skills could be detected and counted for every department. For example, the result desired would be as follow: (headcount value would be larger than 1 if that department has 2 or more members knowing that skill)

 

Please tell me if it is still unclear

 

Department SkillsHeadcount
AAI1
AML1
AJava1
AAngular 1
ACloud1
BJava1
BAngular 1
CMobile1
DReact JS1
FreemanZ
Super User
Super User

hi @Anonymous 

what do you mean by "all that" in "skill AI and all that. "?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.