Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |