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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Mutiple columns split by delimiter, best set up for % in Power Query (for set up in Power BI)

Looking to find % item chosen as most or least helpful -- count most helpful/Item list occurance. Original form has a select all that apply and different item lists depending on the project. Data set looks something like this:

 

Entry IDRespondantClient IDProject IDMost HelpfulLeast HelpfulItem List (they had to choose from)
11Client AAAAHandbook,Poster,FactsheetLetterHandbook,Poster,Factsheet,Letter,PPT
22Client AAAAPoster,FactsheetHandbookHandbook,Poster,Factsheet,Letter,PPT
33Client AAAAHandbook,PosterPPT,LetterHandbook,Poster,Factsheet,Letter,PPT
41Client BBBBHandbookPPTPoster,Flyer,Handbook,PPT
51Client CCCCFactsheetLetterFactsheet,Letter,PPT
62Client CCCCFactsheetPPTFactsheet,Letter,PPT

 

How would you recommend setting up a query in order to acheive the following data set (and to be filterable by Client/Project ID if possible?):

Item name(Count) Most Helpful(Count) Least Helpful# times listed as an option% Most helpful% Least Helpful
Letter0350%60%
Factsheet40580%0%
PPT0360%50%
Handbook31475%25%
Poster30475%0%
Flyer0010%0%

 

I've used split column by delimiter and set up measures to find disctinct count by entry ID for count of most and least helpful, but not sure where to go from there - I'm sure there's a better way to set it up for finding the percentages easily. Any suggestions greatly appreciated! Thank you!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Your item list is immutable for each entry. So expand that to rows  

 

lbendlin_0-1741644376495.png

 

 

Then mark the helpfulness, either in the existing columns or in a new column.

lbendlin_1-1741644653812.png

After that the measures will be easy.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSAWPnnMzUvBIFRyDT0RFEeiTmpSTl52frBOQXl6QW6bglJpcUZ6SmlgDlfFJLgEL4FOlAlOgEBIQoxepEKxkBFRthswaL6TBDSTHfGKjYmAhvgGwMCNEh3QMmqOHkBGQ6OTmhuhakFuGjnEogiTAfao4pqjnOIKYziMQavjidY4YantiNgbgHuxmxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Entry ID" = _t, Respondant = _t, #"Client ID" = _t, #"Project ID" = _t, #"Most Helpful" = _t, #"Least Helpful" = _t, #"Item List" = _t]),
    #"Split Column by Delimiter2" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Item List", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Item List"),
    #"Replaced Value" = Table.ReplaceValue(#"Split Column by Delimiter2",each [Most Helpful],each if List.Contains(Text.Split([Most Helpful],","),[Item List]) then 1 else null,Replacer.ReplaceValue,{"Most Helpful"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",each [Least Helpful],each if List.Contains(Text.Split([Least Helpful],","),[Item List]) then 1 else null,Replacer.ReplaceValue,{"Least Helpful"})
in
    #"Replaced Value1"

 

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Your item list is immutable for each entry. So expand that to rows  

 

lbendlin_0-1741644376495.png

 

 

Then mark the helpfulness, either in the existing columns or in a new column.

lbendlin_1-1741644653812.png

After that the measures will be easy.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSAWPnnMzUvBIFRyDT0RFEeiTmpSTl52frBOQXl6QW6bglJpcUZ6SmlgDlfFJLgEL4FOlAlOgEBIQoxepEKxkBFRthswaL6TBDSTHfGKjYmAhvgGwMCNEh3QMmqOHkBGQ6OTmhuhakFuGjnEogiTAfao4pqjnOIKYziMQavjidY4YantiNgbgHuxmxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Entry ID" = _t, Respondant = _t, #"Client ID" = _t, #"Project ID" = _t, #"Most Helpful" = _t, #"Least Helpful" = _t, #"Item List" = _t]),
    #"Split Column by Delimiter2" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Item List", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Item List"),
    #"Replaced Value" = Table.ReplaceValue(#"Split Column by Delimiter2",each [Most Helpful],each if List.Contains(Text.Split([Most Helpful],","),[Item List]) then 1 else null,Replacer.ReplaceValue,{"Most Helpful"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",each [Least Helpful],each if List.Contains(Text.Split([Least Helpful],","),[Item List]) then 1 else null,Replacer.ReplaceValue,{"Least Helpful"})
in
    #"Replaced Value1"

 

 

Anonymous
Not applicable

Thank you so much!! To confirm I understand, in order to get the total count per item for most helpful (across all clients/projects), would you set up a measure for each unique/distinct item in item list and a condition for when there is a 1 in most helpful or least helpful column?

You can do that, or you can use explicit measures too.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.