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

Tabular Format to List Field Value

Hi Team,

 

I have table data in below format 

FieldNameValue
FirstNameAtul
LastNameKumar
Age28
DesignationProgrammer
FirstNameTony
LastNameM
Age32
DesignationTeam Lead
FirstNameKen
LastNameT
Age40
DesignationSME, PM

 

And I want to conver this to proper tabular format as below :

FirstNameLastNameAgeDesignation
AtulKumar28Programmer
TonyM32Team Lead
KenT40SME, PM

 

Some field value may have Comma in between.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Pat,

 

Thanks for your time and reply. Appreciate your time. I got the desinred result using simple Table.FromRows function.

 

= Table.FromRows( List.Split(MyData[Field_Value], 4) )

= Table.RenameColumns(Source,{{"Column1", "FirstName"}, {"Column2", "LastName"}, {"Column3", "Age"}, {"Column4", "Designation"}})

 

MyData is the table name and there were 4 repated colum values in Vertical table. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi Pat,

 

Thanks for your time and reply. Appreciate your time. I got the desinred result using simple Table.FromRows function.

 

= Table.FromRows( List.Split(MyData[Field_Value], 4) )

= Table.RenameColumns(Source,{{"Column1", "FirstName"}, {"Column2", "LastName"}, {"Column3", "Age"}, {"Column4", "Designation"}})

 

MyData is the table name and there were 4 repated colum values in Vertical table. 

mahoneypat
Microsoft Employee
Microsoft Employee

Please see the example M code below for one way to transform your example data.  To see how it works, just create a blank query, go to Advanced Editor, and replace the text there with the M code below.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcsssKi7xS8xNVdJRciwpzVGK1YlW8kmEi3mX5iYWgQUd00F8IwswxyW1ODM9L7EkMz8PKBhQlJ9elJibmwpRiWxmSH5eJbqZvkjmGRthMS8kNTFXwSc1MQXDOO/UPHTTQpBMMzHAYlqwr6uOQgDQ0lgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [FieldName = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"FieldName", type text}, {"Value", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1),
    #"Added Custom" = Table.AddColumn(#"Added Index", "ItemNumber", each Number.RoundUp([Index]/4,0)),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Index"}),
    #"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[FieldName]), "FieldName", "Value"),
    #"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column",{"ItemNumber"})
in
    #"Removed Columns1"

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.

Top Solution Authors
Top Kudoed Authors