Forum Discussion
FredLEGUEN
8 years agoHelper III
Create dynamic list in Power Query
Hi, Create a list in Power Query it's easy {[col1], [col2], [col3]) But how do you create a list when you have a variable number of columns ? In my case, my headers' name are simple, it's [1], ...
- 8 years ago
You may change it as follows.
Record.ToList(Record.RemoveFields(_, {"Column1", "Column2"}))
FredLEGUEN
8 years agoHelper III
Ok Thanks Sam,
But if want all the columns except the first column or, like in my case, exclude the first 4 columns from your List. In that case, what do you do ?
v-chuncz-msft
8 years agoCommunity Support
You may change it as follows.
Record.ToList(Record.RemoveFields(_, {"Column1", "Column2"}))