Dynamically Remove Empty Columns in Power Query

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 44

  • @GoodlyChandeep
    @GoodlyChandeep  11 месяцев назад

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

  • @juansepowerplatform
    @juansepowerplatform 3 года назад

    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 4 месяца назад

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

  • @suzannekatz3603
    @suzannekatz3603 3 года назад

    Just what the doctor ordered. Thanks!

  • @davidbakker1460
    @davidbakker1460 3 года назад

    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.

  • @wayneedmondson1065
    @wayneedmondson1065 3 года назад +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!!

  • @heaven24
    @heaven24 10 дней назад +1

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

  • @txreal2
    @txreal2 Год назад +1

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

  • @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

  • @mirrrvelll5164
    @mirrrvelll5164 3 года назад

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

  • @CeliaAlvesSolveExcel
    @CeliaAlvesSolveExcel 3 года назад +1

    Great tutorial! Thank you!

  • @raimundojs9547
    @raimundojs9547 Год назад

    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

  • @engahmedelbendary1566
    @engahmedelbendary1566 3 года назад

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

  • @txreal2
    @txreal2 Год назад +1

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

  • @FurquimRafa
    @FurquimRafa 3 года назад +1

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

  • @DK_85
    @DK_85 Год назад

    Thanks a lot Chandeep! Very helpful!

  • @rlds07
    @rlds07 Год назад

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

  • @askulasaatwik8thc644
    @askulasaatwik8thc644 3 года назад

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

  • @brajsharma
    @brajsharma 2 года назад

    Good solution buddy 👍

  • @Chillman666
    @Chillman666 Год назад

    Another very cool lesson

  • @faridPQ
    @faridPQ 3 года назад +1

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

  • @svendewinter7441
    @svendewinter7441 3 года назад

    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 3 года назад +2

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

  • @realpulsecoin
    @realpulsecoin 3 года назад

    This is fire Goodly - great!

  • @holahandstrom
    @holahandstrom 3 года назад +3

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

  • @juja2819
    @juja2819 2 года назад

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

  • @isidrebague3659
    @isidrebague3659 3 года назад

    Just Great, as usual!! Thank You.

  • @msmc1995
    @msmc1995 3 года назад

    Thank you very much

  • @muhawatali1224
    @muhawatali1224 2 года назад

    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.

  • @BoxerDogs
    @BoxerDogs 3 года назад

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

  • @vinod71234
    @vinod71234 3 года назад

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

  • @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)

  • @rahulshewale9206
    @rahulshewale9206 3 года назад

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

  • @MrKamranhaider0
    @MrKamranhaider0 3 года назад

    Amazing

  • @RobertoStaltari
    @RobertoStaltari 3 года назад

    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.

  • @dharmmu
    @dharmmu 7 месяцев назад

    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.