Forum Discussion
Transforming row data into a new column
Would appreciate help with this problem.
How do I transform this ..................
Column1Column2Column3Column4Column5
| A | B | C | D | |
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 |
This.................
| Column1 | Column2 |
| 1 | A |
| 1 | B |
| 1 | C |
| 1 | D |
| 2 | A |
| 2 | B |
| 2 | C |
| 2 | D |
| 3 | A |
| 3 | B |
| 3 | C |
| 3 | D |
| 4 | A |
| 4 | B |
| 4 | C |
| 4 | D |
- Anonymous5 years ago
Hi MD986546
You can use Unpivot Other Columns in Query Editor .
Original data:
Select the ID column and click Unpivot Other Columns ,then you will get three columns like this :
Delete the Attribute column ,and close & apply to desktop view .You will get a result like this :
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- ChrisMendoza
Resident Rockstar
Do you mean like this?
You can do in Power Query (basically select all the columns then unpivot):
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("JcixEQAgCATBXj42EWhAoQuH/tvQG5MN9hytqaENCTXV462xkFD211lIKP8bLCRUqPsC", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", type text}, {"B", type text}, {"C", type text}, {"D", type text}}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value"), #"Sorted Rows" = Table.Sort(#"Unpivoted Columns",{{"Attribute", Order.Ascending}, {"Value", Order.Ascending}}) in #"Sorted Rows" - AnonymousNot applicable
Hi MD986546
You can use Unpivot Other Columns in Query Editor .
Original data:
Select the ID column and click Unpivot Other Columns ,then you will get three columns like this :
Delete the Attribute column ,and close & apply to desktop view .You will get a result like this :
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.