Forum Discussion
Anonymous
3 years agoNot applicable
Open a list considering columns
Hello everyone, I hope you are doing well. I have a challenging situation and i would like your help. I have three columns. StartYear, EndYear, List as you see in the following image. I ne...
- 3 years ago
Hi, Anonymous try this
let Source = <your_source_table>, type_int = Table.TransformColumnTypes(Source,{{"STARTYEAR", Int64.Type}, {"ENDYEAR", Int64.Type}}), z = Table.Combine(Table.AddColumn(type_int, "Custom", each Table.FromColumns({{[STARTYEAR]..[ENDYEAR]} , [JSON_ARRAY]}))[Custom]) in z
AlienSx
3 years agoSuper User
Hi, Anonymous try this
let
Source = <your_source_table>,
type_int = Table.TransformColumnTypes(Source,{{"STARTYEAR", Int64.Type}, {"ENDYEAR", Int64.Type}}),
z = Table.Combine(Table.AddColumn(type_int, "Custom", each Table.FromColumns({{[STARTYEAR]..[ENDYEAR]} , [JSON_ARRAY]}))[Custom])
in
zAnonymous
3 years agoNot applicable
Just one more question. I wanna keep my old columns. Is it possible?
- AlienSx3 years agoSuper User
it is
let Source = your_source_table, type_int = Table.TransformColumnTypes(Source,{{"STARTYEAR", Int64.Type}, {"ENDYEAR", Int64.Type}}), z = Table.ExpandTableColumn(Table.AddColumn(type_int, "Custom", each Table.FromColumns({{[STARTYEAR]..[ENDYEAR]} , [JSON_ARRAY]})),"Custom", {"Column1", "Column2"}) in z- Anonymous3 years agoNot applicable
Amazing. Thank you