Forum Discussion

Joe_Sauer's avatar
Joe_Sauer
New Member
2 years ago
Solved

Request Help on PQ Prob: De-concatenate Name data, Assoc w/YN data & Calc Percent Yes by Name

In my Source query, I have concatenated Name data that is associated with separate YesNo data, that looks like the first table below. The actual set of names is a long list of ~100 people (in 'Last N...
  • lbendlin's avatar
    2 years ago
    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fZGxDsIwDET/JXP/4CYoQh0QZUVRhyIhxAAZQGo/n7ipY5sERsfOPd/Ze3e+vlzj2vHthsa7Y4jFLtyWIrW2aytV3dpbBk93PdjP0tmHWXUO4+OiyjZMMrl5KnJcAwUdnXmJUHyhkAFJJUxg2WyPdFF4wS818JLiAH91YZIRadgotH5FjIQ4Vb4FKfOOEgqps3RG9iqKNBoRiadNEpsWKUjVfMyJLbOSlPaVb2qNEsl+IkP2hsS2yfGlhg8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [YesNo = _t, Name = _t]),
        #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Name", Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Name")
    in
        #"Split Column by Delimiter"

    How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.