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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Mr_Indy
Frequent Visitor

Unpivot a column without side information

Hello,

I am extracting a dataset from a php link.

 

Unpivot table.PNG

 

After splitting by delimiter i get one line with all data

 

one line.PNG

 

after unpivoting i end with these columns

 

Unpivot.PNG

 

The values on column 1 (Attribute) do not have a clear name and i can't use them to pivot the values on column 2 (Value).

 

Is there another way to pivot column 2?

 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @Mr_Indy ,
please add an additional step to your query with the following formula:

Table.FromRows( List.Split( #"Name of your previous step here"[Value], 12 ) )

 

Or paste the following code into the advanced editor and follow the steps:

 

let
    Source = Table.FromRows(
        Json.Document(
            Binary.Decompress(
                Binary.FromText("i45WMtQzUtJRMtQ1UorVAfFMwDwTKM8IxDWCSxqZgblA2VgA", BinaryEncoding.Base64), 
                Compression.Deflate
            )
        ), 
        let
            _t = ((type nullable text) meta [Serialized.Text = true])
        in
            type table [Attribute = _t, Value = _t]
    ), 
    #"Changed Type" = Table.TransformColumnTypes(Source, {{"Attribute", type number}, {"Value", type text}}), 
    Custom1 = Table.FromRows(List.Split(#"Changed Type"[Value], 2))
in
    Custom1

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

3 REPLIES 3
ImkeF
Community Champion
Community Champion

Correct @Mr_Indy ,
that's how it works.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ImkeF
Community Champion
Community Champion

Hi @Mr_Indy ,
please add an additional step to your query with the following formula:

Table.FromRows( List.Split( #"Name of your previous step here"[Value], 12 ) )

 

Or paste the following code into the advanced editor and follow the steps:

 

let
    Source = Table.FromRows(
        Json.Document(
            Binary.Decompress(
                Binary.FromText("i45WMtQzUtJRMtQ1UorVAfFMwDwTKM8IxDWCSxqZgblA2VgA", BinaryEncoding.Base64), 
                Compression.Deflate
            )
        ), 
        let
            _t = ((type nullable text) meta [Serialized.Text = true])
        in
            type table [Attribute = _t, Value = _t]
    ), 
    #"Changed Type" = Table.TransformColumnTypes(Source, {{"Attribute", type number}, {"Value", type text}}), 
    Custom1 = Table.FromRows(List.Split(#"Changed Type"[Value], 2))
in
    Custom1

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Mr_Indy
Frequent Visitor

Thank you @ImkeF ! So the logic is to create a table based on the number of rows and since i have 12 rows for each record it's looping on these values.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.