Dynamically Remove Empty Columns in Power Query

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 45

  • @GoodlyChandeep
    @GoodlyChandeep  ปีที่แล้ว

    Check out our newly launched M Language course ↗ - goodly.co.in/learn-m-powerquery/

  • @juansepowerplatform
    @juansepowerplatform 4 ปีที่แล้ว

    Thanks for the video, sure there are many other ways to get this done using the UI, but your video showcases how to really use M, how to refer back to previous steps, how to break your steps into logical chucks. Best channel to really learn M language. Thank you sir

  • @1989PU
    @1989PU 2 ปีที่แล้ว

    Great Video.
    What i usually use ( from GUI itself) is something like this:
    1. Transpose (before promoting headers)
    2. Remove Rows > Remove Blank Rows
    3. Transpose back again.

    • @odallamico
      @odallamico 7 หลายเดือนก่อน

      With large amounts of data, your process can become slow.

  • @suzannekatz3603
    @suzannekatz3603 3 ปีที่แล้ว

    Just what the doctor ordered. Thanks!

  • @davidbakker1460
    @davidbakker1460 4 ปีที่แล้ว

    Awesome video as always, thank you! I’m actually exploring writing the M code myself, instead of using the UI. It is actually working out quite wel, thanks to your videos. Awesome that we can combine multiple steps in 1 step when we write the M code ourselves.

  • @stephanweaver1960
    @stephanweaver1960 3 ปีที่แล้ว

    Good I did the same but using a configuration file that lists expected column names and use that to clean my input file. Didactic suggestion that would make us at the beginning of your videos also state the lessons to be learned, and then just recap at the end. Excellent

  • @FurquimRafa
    @FurquimRafa 3 ปีที่แล้ว +1

    Man, your videos are amazing and very didactic! Keep the good work!

  • @mirrrvelll5164
    @mirrrvelll5164 4 ปีที่แล้ว

    Useful video. It happens quite often actually that I need to remove columns manually.

  • @wayneedmondson1065
    @wayneedmondson1065 4 ปีที่แล้ว +1

    Hi Chandeep. Excellent lesson! Another approach is from the reverse.. using Table.SelectColumns to specifically select only the desired columns, thereby filtering out everything else, as in: = Table.SelectColumns(Table.PromoteHeaders(Table.Combine(Source[Data])),{"Name","Age","Company"}). Of course, if you add more desired columns, you would have to modify the query for the additions. I guess it depends on whether you are more prone to adding new columns of desired data that need to be included or adding new columns of undesired data that need to be excluded. Either way, good to know both approaches. Thanks for sharing this! Always good learning at Goodly :)) Thumbs up!!

  • @DK_85
    @DK_85 2 ปีที่แล้ว

    Thanks a lot Chandeep! Very helpful!

  • @askulasaatwik8thc644
    @askulasaatwik8thc644 4 ปีที่แล้ว

    Thank you!, Learned a new thing today in Power Query.

  • @CeliaAlvesSolveExcel
    @CeliaAlvesSolveExcel 4 ปีที่แล้ว +1

    Great tutorial! Thank you!

  • @engahmedelbendary1566
    @engahmedelbendary1566 3 ปีที่แล้ว

    thx alot for your effort Really i had learned more Information from your Videos

  • @txreal2
    @txreal2 ปีที่แล้ว +1

    Can I import a selected columns list that I have in Excel?

  • @txreal2
    @txreal2 2 ปีที่แล้ว +1

    Nice!
    🙋‍♂For data modeling, how do I keep only ColNames that have 80% or more of non-nulls?

  • @rlds07
    @rlds07 2 ปีที่แล้ว

    Excellent tip. How to do when we do not yet have the header set?

  • @brajsharma
    @brajsharma 2 ปีที่แล้ว

    Good solution buddy 👍

  • @svendewinter7441
    @svendewinter7441 4 ปีที่แล้ว

    Hi Goodly - Why do you not transpose & remove blank rows & transpose again? Seems easier for blank column removal and also dynamic

    • @Alan.DL7
      @Alan.DL7 4 ปีที่แล้ว +2

      That will only work for blank columns but if you have some text then is not possible I believe.

  • @heaven24
    @heaven24 3 หลายเดือนก่อน +1

    How we can remove empty columns from multiple tables, but without merging tables?

  • @raimundojs9547
    @raimundojs9547 2 ปีที่แล้ว

    Great video! Suggestions about the following function, please:
    (Tab as table) as table =>
    let
    LstOriginalColumnNames = Table.ColumnNames(Tab),
    LstColumnListOfLists = Table.ToColumns(Tab),
    TbConvertedToTable = Table.FromValue(LstColumnListOfLists, [DefaultColumnName = "ListOfLists"]),
    TbIndexColumn = Table.AddIndexColumn(TbConvertedToTable, "Index", 0, 1, Int64.Type),
    TbNonNullColsIndex = Table.SelectRows(TbIndexColumn, each List.NonNullCount([ListOfLists]) 0),
    LstNonNullCols = Table.AddColumn(TbNonNullColsIndex, "NonNullCols", each LstOriginalColumnNames{[Index]})[NonNullCols],
    TbOutput = Table.SelectColumns(Tab, LstNonNullCols)
    in
    TbOutput

  • @realpulsecoin
    @realpulsecoin 4 ปีที่แล้ว

    This is fire Goodly - great!

  • @isidrebague3659
    @isidrebague3659 4 ปีที่แล้ว

    Just Great, as usual!! Thank You.

  • @faridPQ
    @faridPQ 4 ปีที่แล้ว +1

    Will you please make a video on finding Subtotal in Power Query like Subtotal in Excel pivot but not Group by?

  • @Chillman666
    @Chillman666 ปีที่แล้ว

    Another very cool lesson

  • @juja2819
    @juja2819 3 ปีที่แล้ว

    Thank you! :) But what if there is column(s) with other names then column and they still has only null in each row?

  • @msmc1995
    @msmc1995 3 ปีที่แล้ว

    Thank you very much

  • @muhawatali1224
    @muhawatali1224 3 ปีที่แล้ว

    Sir Great Help. Please tell me how i can show the Formulas or functions while Typing some part as in your video. I am using office 19.

  • @Rood6
    @Rood6 3 ปีที่แล้ว

    This was really helpful, however for some reason it seems to merge all data into a single table when there are multiple sheets in the excelworkbook. Is there a way to refer to a certain Item?

    • @GoodlyChandeep
      @GoodlyChandeep  3 ปีที่แล้ว

      You'll have the option to navigate to a single workbook in the Navigation step (typically after the source step)

  • @BoxerDogs
    @BoxerDogs 3 ปีที่แล้ว

    The formulas you are typing in, is that the DAX language or something else?

  • @vinod71234
    @vinod71234 4 ปีที่แล้ว

    Apne kaha this is simple data.....please make video on how to handle complex data in dax

  • @rahulshewale9206
    @rahulshewale9206 4 ปีที่แล้ว

    Hi sir ,
    Thanks you so much for 📷
    Could you please make video how to fetch table from NSE INDIA website ?

  • @MrKamranhaider0
    @MrKamranhaider0 3 ปีที่แล้ว

    Amazing

  • @holahandstrom
    @holahandstrom 4 ปีที่แล้ว +3

    Why not just Transpose, Unfilter Blank, and Transpose again. Done.

  • @RobertoStaltari
    @RobertoStaltari 4 ปีที่แล้ว

    I like that you don't use the user interface. It's the only way to learn M.

  • @lionels839
    @lionels839 ปีที่แล้ว

    How to dynamically remove blanks rows?

  • @jacobmurray6731
    @jacobmurray6731 3 ปีที่แล้ว

    I'd be keen to know how to delete columns where all the rows are empty but there is a normal header

    • @GoodlyChandeep
      @GoodlyChandeep  3 ปีที่แล้ว

      Noted:) Need to put together a video for that.

  • @aniljaggarwal60
    @aniljaggarwal60 2 หลายเดือนก่อน

    Null records वाले कॉलम नहीं हट रहे । मदद कीजिए प्लीज।

  • @dharmmu
    @dharmmu 10 หลายเดือนก่อน

    Sorry but the solution is not correct. You are removing not the empty columns but the columns which don't have any header name. These two are different issue. Sometime our column may have data, might be 10th or 20th row, in that case your formula will ignore that column, which is not correct. In my scenario by removing the whole column, you are removing some data which was not type properly. There should be some other option, which remove the column only if all the row in that column is nulll.