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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Hugo06
New Member

Count of name in multiple columns

Hi everyone,

I am a beginer in PowerBI and i struggle on the following point.

 

Here is an example of the data that I have :

Name 1Name 2Name 3
JeanPeter 
PeterJean 
DanielJean 
MikeEvanJean

 

I would like to count how many time each name appear in one of the 3 collumns and vizualize this in a pie chart.
On the exemple here, the result should be :

Jean : 4

Peter : 2

Daniel : 1

Mike : 1 

Evan : 1

 

Could you please help me to figured out how to do it with a measure ? 

 

Thanks in advance for your help.

1 ACCEPTED SOLUTION
pratyashasamal
Memorable Member
Memorable Member

Hi @Hugo06 ,
Select the three name columns and under the Transform tab select Unpivot Columns, Unpivot Only Selected Columns

pratyashasamal_0-1689781701366.png

right click on the value column and select Split Column, By Delimiter

pratyashasamal_2-1689781701861.png

split by comma and under the Advanced options choose Split into Rows

Trim the resulting value column (Transform -> Format -> Trim)

Filter out blanks from the value column .

You can now Close & Apply.
Now you can use COUNT and create visual out of this.

CountName = COUNT(NameTable[Value])

 


Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
VilmarSch
Post Partisan
Post Partisan

Uma alternativa seria transformar colunas em linhas no Power Query, depois uma medida dax

Sem título.png

 

Contar = COUNT(Tabela1[Valor])

Sem título.png

pratyashasamal
Memorable Member
Memorable Member

Hi @Hugo06 ,
Select the three name columns and under the Transform tab select Unpivot Columns, Unpivot Only Selected Columns

pratyashasamal_0-1689781701366.png

right click on the value column and select Split Column, By Delimiter

pratyashasamal_2-1689781701861.png

split by comma and under the Advanced options choose Split into Rows

Trim the resulting value column (Transform -> Format -> Trim)

Filter out blanks from the value column .

You can now Close & Apply.
Now you can use COUNT and create visual out of this.

CountName = COUNT(NameTable[Value])

 


Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.