Forum Discussion
Anonymous
6 years agoNot applicable
How to remove unwanted columns dynamically
Hi I wish to remove unwanted columns from data by using "M-Code", not option "remove other colums in query editor. Ref Link below Link Thanks
- 6 years ago
Hi Anonymous ,
Yes,for my .pbix file,pls click here.
Go to "edit queries">"Table">"steps",you will find my M-code there.
Best Regards,
Kelly
v-kelly-msft
Community Support
6 years agoHi Anonymous ,
You can use M-code such as below:
= Table.RemoveColumns(Source,{"test"}&{"test 2"})
{"test"}{"test 2"} are the tables I removed,and you will see that in my previous table there are 3 columns:Date ,test, test 2,and with the M-code,there are only 1 column left.
Best Regards,
Kelly
Anonymous
6 years agoNot applicable
Thank you!
I tried the way you suggested, but not success got. could you please share your BI file to understand the same? if possible
Thanks occe again.
- v-kelly-msft6 years ago
Community Support
Hi Anonymous ,
Yes,for my .pbix file,pls click here.
Go to "edit queries">"Table">"steps",you will find my M-code there.
Best Regards,
Kelly
- Anonymous6 years agoNot applicable
not able to download
- v-kelly-msft6 years ago
Community Support