Forum Discussion
Extract List to new Column
- 4 years ago
Just leave code part. I think Extract values part will be very easy for you (it will generated required code automatically)
click the doubled edge arrow and Extract values.
Choose custom and then select Concatenate using special characters - Insert Special Characters - Select Line Feed - OK
That will work but the problem then is that then introduces rows with duplicate content, how can I get the data all within the same row?
Do you need this kind of output?
If yes - See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIxNVWK1YlWcgKyDY3MLZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Customer = _t, Sales = _t]),
#"Added Custom" = Table.AddColumn(Source, "Choices", each if [Customer] = "A" then {"C2","C2","C3"} else {"C4","C5"}),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Choices", each Text.Combine(List.Transform(_, Text.From), "#(lf)"), type text})
in
#"Extracted Values"- CMC4 years agoHelper I
Yes the only column I'm interested in the Choices Column and to get the data extracted, there is requirement to look at the customer specifically , that code you are looking for specific values, how do you make it generic to just create the new column and data?
- Vijay_A_Verma4 years agoMost Valuable Professional
Can you open one list and post here the screenshot and then you can describe what output you want...
- CMC4 years agoHelper I
Ok sure..
1. Extract the values from the list field, which could be anything, e.g. Apple, Pear, Carrot
2. Create a new colum with those values so it looks like