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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
brankocareer
Helper I
Helper I

Column change form of expression

Hi all,

 

I want to create a report to show the change of any column in a database. Current the table is like this: 

brankocareer_0-1715624307281.png

What I need is showing like this:

brankocareer_1-1715624478672.png

What I can do?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lbendlin ,

Thanks for your quick response.

Hi @brankocareer ,

Please refer to my pbix file to see if it helps you.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjUwMDQwNzFU0lEqS0xOzCsBMpJKizPzUouLFYpTi8oyk1OLgWK+mXmZxSVFlQrFpQUF+UUlCLlYHRRT0jJzclJTSDclFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"postition id" = _t, #"postion status" = _t, branch = _t, unit = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"postition id", Int64.Type}, {"postion status", type text}, {"branch", type text}, {"unit", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"postition id", "branch", "unit"}, "Attribute", "Value"),
    #"Added Index" = Table.AddIndexColumn(#"Unpivoted Columns", "Index", 1, 1, Int64.Type),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Added Index", {{"Index", type text}}, "en-US"),{"Attribute", "Index"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Postatus"),
    #"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Postatus]), "Postatus", "Value")
in
    #"Pivoted Column"

vrongtiepmsft_0-1715652718989.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @lbendlin ,

Thanks for your quick response.

Hi @brankocareer ,

Please refer to my pbix file to see if it helps you.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjUwMDQwNzFU0lEqS0xOzCsBMpJKizPzUouLFYpTi8oyk1OLgWK+mXmZxSVFlQrFpQUF+UUlCLlYHRRT0jJzclJTSDclFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"postition id" = _t, #"postion status" = _t, branch = _t, unit = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"postition id", Int64.Type}, {"postion status", type text}, {"branch", type text}, {"unit", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"postition id", "branch", "unit"}, "Attribute", "Value"),
    #"Added Index" = Table.AddIndexColumn(#"Unpivoted Columns", "Index", 1, 1, Int64.Type),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Added Index", {{"Index", type text}}, "en-US"),{"Attribute", "Index"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Postatus"),
    #"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Postatus]), "Postatus", "Value")
in
    #"Pivoted Column"

vrongtiepmsft_0-1715652718989.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

lbendlin
Super User
Super User

First thing is to bring your own index column. Power Query has no natural sort order.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.