Forum Discussion
How to remove unwanted columns dynamically
- 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
You gave the video that answers your question?
Anyway, "Remove other columns" in Power query generates "M-code" for you (that is the whole point of the Query Editor, it generates the M code for you rather then having to create it yourself). You can also type in the M code yourself, I believe it is Table.SelectColumns() that returns a table with only the desired columns.
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
I am not much aware about M-code
Please guide me on this more with any example
Please
- JarroVGIT6 years agoResident RockstarThis question is too broad to answer. Why can't you use the "remove columns" option in power query editor? What have you tried already? Where exactly are you getting stuck?