Forum Discussion
Expand colum problem
- 9 years ago
Great, thanks you v-lvzhan-msft, not exact like i looking for but appriciated. I made a parameter ColsToKeep = Table.ToList(tbl1) from Table1 then try #"Expanded tbl2" = Table.ExpandTableColumn(PreviousStep, "tbl2", ColsToKeep, ColsToKeep) . Worked. Thanks again.
If what you'd like is to select certain columns from one table based on the columns stored in another table, check
let
Source = Table.FromRows({{1,2,3,4,5},{1,2,3,4,5},{1,2,3,4,5}},{"col1","col2","col3","col4","col5"}),
columnListTable = Table.FromRows({{"col1"},{"col2"},{"col3"}},{"column"}),
selectedColumns = Table.SelectColumns(Source,Table.ToList(columnListTable ))
in
selectedColumnsGreat, thanks you v-lvzhan-msft, not exact like i looking for but appriciated. I made a parameter ColsToKeep = Table.ToList(tbl1) from Table1 then try #"Expanded tbl2" = Table.ExpandTableColumn(PreviousStep, "tbl2", ColsToKeep, ColsToKeep) . Worked. Thanks again.
- Eric_Zhang9 years agoMicrosoft Employee
As your question is solved, if no further questions, you can accept your that reply as solution to close this thread. :)