Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
This is not an urgent concern but I am just curious how to do this without actually converting the list to table.
let StartDate= DateTime.Date(DateTime.LocalNow()), EndDate= Date.AddYears(StartDate,-2), #"List of Lists" = List.Zip({ List.Generate( ()=>EndDate, each _ <= StartDate, each Date.AddDays(_,1)), List.Generate( ()=>StartDate, each _ >= EndDate, each Date.AddDays(_,-1))}), #"Converted to Table" = Table.FromList(#"List of Lists", Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Extracted Values" = Table.TransformColumns(#"Converted to Table", {"Column1", each Text.Combine(List.Transform(_, Text.From), ","), type text}), Column1 = #"Extracted Values"[Column1] in Column1
In the script above, I would like to insert a step after #"List of Lists" that will combine the list of lists for each row into just one list. I've tried List.Transform but I couldn't get it right.
Proud to be a Super User!
Solved! Go to Solution.
You may refer to the code below.
Column1 = List.Transform(#"List of Lists" , each Text.Combine(List.Transform(_, each Text.From(_)), ","))
You may refer to the code below.
Column1 = List.Transform(#"List of Lists" , each Text.Combine(List.Transform(_, each Text.From(_)), ","))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |