Forum Discussion
Merge columns to create new entries
- 3 years ago
No worries, you're welcome! You can click the fx button to the left of the formula bar which will create a new step in the query. Then paste this snippet into the formula bar and replace #"Your Previous Step Name" with the name of your last step.
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Your Previous Step Name", {"Date", "Time"}, "Attribute", "Issue")
Hello - this will produce the expected results.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtY3MgAiI2MlHSULKwMDIAKynIpSE7OL88vzFHQVHIFsBUOgoFKsDqp6QwNUDSkQDc5FiXmpxXBTMLUZwbVhNdUMLh2cUZpXkloEVhULAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Time = _t, #"Issue 1" = _t, #"Issue 2" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Time", type time}, {"Issue 1", type text}, {"Issue 2", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Date", "Time"}, "Attribute", "Issue")
in
#"Unpivoted Other Columns"
Hi Jenn,
Thanks for the quick response.
Apologies, does that code go into the advanced editor for that query, and does any of the existing code need changed?
Thanks again
- jennratten3 years ago
Super User
No worries, you're welcome! You can click the fx button to the left of the formula bar which will create a new step in the query. Then paste this snippet into the formula bar and replace #"Your Previous Step Name" with the name of your last step.
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Your Previous Step Name", {"Date", "Time"}, "Attribute", "Issue")- BornSlippy993 years agoRegular Visitor
Brilliant, this worked.
Thanks a lot!