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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mahnoor1279
Frequent Visitor

Change multiple row value into column

Hey everyone i'm new to powerbi  and got stuck in a stiuation 

the data i've is 

Capture.PNG

 

 

 

 

 

And the result i want is

 

Capture1.PNG

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXL0BRJRQGxkYGSoa2Cka2gEEnVyVorVwaciPDjYBazECchxASlxhCsx1TU0BnIiIqPAKpyBbFQFJhAFjuFQM3CqcHL0C/WOBKtxAcmDiCBkp5iCnBICMcUVagqGWyMiQpRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Designation = _t, #"Manager Name" = _t, Date = _t, #"Client name" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Name", "Designation", "Manager Name", "Date"}, {{"Client name", each Text.Combine([Client name],","), type nullable text}}),
    Custom1 = Table.SplitColumn(#"Grouped Rows", "Client name", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), List.Transform({1..List.Max(Table.AddColumn(#"Grouped Rows", "Temp", each List.Count(Text.Split([Client name],",")))[Temp])},each "Client name." & Number.ToText(_)))
in
    Custom1

 

View solution in original post

1 REPLY 1
Vijay_A_Verma
Super User
Super User

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXL0BRJRQGxkYGSoa2Cka2gEEnVyVorVwaciPDjYBazECchxASlxhCsx1TU0BnIiIqPAKpyBbFQFJhAFjuFQM3CqcHL0C/WOBKtxAcmDiCBkp5iCnBICMcUVagqGWyMiQpRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Designation = _t, #"Manager Name" = _t, Date = _t, #"Client name" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Name", "Designation", "Manager Name", "Date"}, {{"Client name", each Text.Combine([Client name],","), type nullable text}}),
    Custom1 = Table.SplitColumn(#"Grouped Rows", "Client name", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), List.Transform({1..List.Max(Table.AddColumn(#"Grouped Rows", "Temp", each List.Count(Text.Split([Client name],",")))[Temp])},each "Client name." & Number.ToText(_)))
in
    Custom1

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.