Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi
I wish to remove unwanted columns from data by using "M-Code", not option "remove other colums in query editor.
Ref Link below
Thanks
Solved! Go to Solution.
Hi @Amardeep100115 ,
Yes,for my .pbix file,pls click here.
Go to "edit queries">"Table">"steps",you will find my M-code there.
Best Regards,
Kelly
Hi @Amardeep100115 ,
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
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.
Hi @Amardeep100115 ,
Yes,for my .pbix file,pls click here.
Go to "edit queries">"Table">"steps",you will find my M-code there.
Best Regards,
Kelly
not able to download
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! 🙂
Proud to be a Super User!
I am not much aware about M-code
Please guide me on this more with any example
Please
Proud to be a Super User!
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |