Microsoft Power Query: Remove empty columns dynamically!

preview_player
Показать описание
In this video, we will look at how we can drop empty columns in power query dynamically.

We will use tranpose technique along with List.NonNullCount and Record.ToList to achieve this task.

Once done, we will double check by adding new empty columns to ensure our power query works as intended.

**Unfortunately, this method doesnt retain the column names, you will need to rename the columns again**

If you like the video, please like, share, and subscribe. If you have any comments or video suggestions, make sure to post in comment section.

You can support me by buying a coffee here.

Рекомендации по теме
Комментарии
Автор

Good solution. If you want to remove just blank columns you could also transpose then just apply the Remove Rows>Remove Blank Rows which results in a cleaner formula. I do like the flexibility of your solution though to remove columns with only 1 entry.

Timbollew
Автор

Great solution! Just wondering, what would you recommend if my dataset exceeds the column limit? Asking because I'm working with a dataset with +80k records and need ideas. Thanks!

ivandanielacerogonzalez
Автор

Good solution, except you lose the column headers. Is there a way to do this without having to rename every column back to what it was?

EvanGibbs-zk