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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
pal95
Helper III
Helper III

Count multiple strings in a column

Hello,
I have a column which can have multiple users; it looks like:

              Column1
Row 1: UserA
Row 2: UserB
Row 3: UserB, UserC, UserG, UserZ
Row 4: User D,
Row 5: UserA, UserD, UserG
Row 6: UserD, UserF

As we see, UserD appeared in the column 3 times, UserA appeared 2 times etc. How to pull out every user from the column to make a visual which says how many times each user appeared in the column?

Thank you for your time!

Regards,
Wojciech

2 ACCEPTED SOLUTIONS
Pragati11
Super User
Super User

Hello @pal95 ,

You will need to split your column into multiple columns in the query editor as shown in this blog:

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

You can then count the occurrences of a string in multiple columns that reference the following existing thread:

https://community.powerbi.com/t5/Desktop/Count-instances-of-string-in-multiple-columns/td-p/239302

Thank you

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

ryan_mayu
Super User
Super User

@pal95

in the pq, split column

1.PNG

then group by

2.PNG3.PNG





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @pal95,

You can try to use following calculate table formulae to analysis raw table and generated the summarize user tables based on each item and their count:

Summary = 
VAR merge =
    SUBSTITUTE (
        CONCATENATEX ( ALL ( 'Table'[Column1] ), [Column1], "," ),
        " ",
        ""
    )
VAR _path =
    SUBSTITUTE ( merge, ",", "|" )
VAR list =
    ADDCOLUMNS (
        GENERATESERIES ( 1, PATHLENGTH ( _path ), 1 ),
        "Users", PATHITEM ( _path, [Value] )
    )
RETURN
    FILTER (
        GROUPBY ( list, [Users], "Count", COUNTX ( CURRENTGROUP (), [Users] ) ),
        [Users] <> BLANK ()
    )

1.png

Regards,

Xiaoxin Sheng

ryan_mayu
Super User
Super User

@pal95

in the pq, split column

1.PNG

then group by

2.PNG3.PNG





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

Proud to be a Super User!




Pragati11
Super User
Super User

Hello @pal95 ,

You will need to split your column into multiple columns in the query editor as shown in this blog:

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

You can then count the occurrences of a string in multiple columns that reference the following existing thread:

https://community.powerbi.com/t5/Desktop/Count-instances-of-string-in-multiple-columns/td-p/239302

Thank you

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

amitchandak
Super User
Super User

@pal95 , see split by row/column in power Query.edit query can help

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.