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
Anonymous
Not applicable

Count of multiple selections

I've a sharepoint that I use to report results. One of the columns in the sharepoint has multi selection.

How can I find a way to create visualization when there are multi-selections?

 

e.g.

IDNamePreferred Colors
1JohnRed, Blue, White
2MarieWhite, Blue, Red
3SteveWhite, Red
4AllisonPink, Red

 

I want to be able to have a table that looks like this:

ColorCount
Red4
Blue2
Pink1
White3

 

The SharePoint column shows in PowerBI as [List]

YJAMOUS_0-1636482558430.png

 

When I try to expand it, it looks like this

 

["Red", "Blue", "White"]

["White", "Blue", "Red"]

["White", "Red"]

 

Thanks in Advance

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download sample PBIX file

 

You can extract the Lists to separate rows in Power Query

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLKz8hTitWJVjICcnwTizJTwTxjIC+4JLUMwjMB8hxzcjKL84FqYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Preferred Colors", each if [Name] = "John" then {"Red", "Blue", "White"} 

else if [Name] = "Marie" then {"White", "Blue", "Red"}

else if [Name] = "Steve" then {"White", "Red"} 

else {"Pink", "Red"}),
    #"Expanded Preferred Colors" = Table.ExpandListColumn(#"Added Custom", "Preferred Colors")
in
    #"Expanded Preferred Colors"

 

countcol1.png

countcol2.png

 

 

Close PQ then add a table showing Preferred Colors in the 1st column and Count of Preferred Colors in the 2nd column

countcol.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download sample PBIX file

 

You can extract the Lists to separate rows in Power Query

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLKz8hTitWJVjICcnwTizJTwTxjIC+4JLUMwjMB8hxzcjKL84FqYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Preferred Colors", each if [Name] = "John" then {"Red", "Blue", "White"} 

else if [Name] = "Marie" then {"White", "Blue", "Red"}

else if [Name] = "Steve" then {"White", "Red"} 

else {"Pink", "Red"}),
    #"Expanded Preferred Colors" = Table.ExpandListColumn(#"Added Custom", "Preferred Colors")
in
    #"Expanded Preferred Colors"

 

countcol1.png

countcol2.png

 

 

Close PQ then add a table showing Preferred Colors in the 1st column and Count of Preferred Colors in the 2nd column

countcol.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors