Forum Discussion
michellerob2000
3 years agoHelper I
Transposing from columns to rows
I need to move the names (col B) to rows assigned to the app group name - I've tried unpivot - I cannot work out how to do it. For example WP2CCAC - Kasia Barnert and Shelley Attfield on one row...
AntrikshSharma
3 years agoCommunity Champion
michellerob2000 Paste this code in the advanced editor:
let
Source =
Table.FromRows (
Json.Document (
Binary.Decompress (
Binary.FromText (
"i45WCg8wcnZ2dFbSUfJOLM5MVHBKLMpLLSpRitVBlgvOSM3JSa1UcCwpSctMzUlBljYwBCoISC1JLVJwzkgsyE3Mw5B1L0pMTlVwApqhFBsLAA==",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ( ( type nullable text ) meta [ Serialized.Text = true ] )
in
type table [ #"App Group Name" = _t, Description = _t ]
),
ChangedType =
Table.TransformColumnTypes (
Source,
{ { "App Group Name", type text }, { "Description", type text } }
),
GroupedRows =
Table.Group (
ChangedType,
{ "App Group Name" },
{ { "Result", each Text.Combine ( _[Description], " and " ), type text } }
)
in
GroupedRows