Dynamically Re-Order Columns in Power Query

Поделиться
HTML-код
  • Опубликовано: 6 фев 2024
  • In this video, you will learn how to dynamically reorder columns in Power Query, whether you're working in Excel or Power BI. Learn how to create a user interface that allows you to define the positions of the columns, giving the user greater control and flexibility.
    #powerquery #datacleaning #dataanalysis
    ===== ONLINE COURSES =====
    ✔️ Mastering DAX in Power BI -
    goodly.co.in/learn-dax-powerbi/
    ✔️ Power Query Course-
    goodly.co.in/learn-power-query/
    ✔️ Master Excel Step-by-Step -
    goodly.co.in/learn-excel/
    ✔️ Business Intelligence Dashboards-
    goodly.co.in/learn-excel-dash...
    ===== LINKS 🔗 =====
    Blog 📰 - www.goodly.co.in/blog/
    Corporate Training 👨‍🏫 - www.goodly.co.in/training/
    Need my help on a Project 💻- www.goodly.co.in/consulting/
    Download File ⬇️ - goodly.co.in/dynamic-column-r...
    ===== CONTACT 🌐 =====
    Twitter - / chandeep2786
    LinkedIn - / chandeepchhabra
    Email - goodly.wordpress@gmail.com
    ===== WHO AM I? =====
    A lot of people think that my name is Goodly, it's NOT ;)
    My name is Chandeep. Goodly is my full-time venture where I share what I learn about Excel and Power BI.
    Please browse around, you'd find a ton of interesting videos that I have created :) Cheers!
  • НаукаНаука

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

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

    Download the file ⬇ - goodly.co.in/dynamic-column-re-ordering-power-query
    Tackle even the most challenging data-cleaning problems. Check out the M Language course and push beyond the user interface ↗ - rb.gy/a2zsnn

  • @AlesKus
    @AlesKus 5 месяцев назад +6

    Dear Chandeep! It was really a pleasure to meet you at GES today! As mentioned - you are best! Thank you for all your shared work!

    • @we.visuals
      @we.visuals 5 месяцев назад

      What is GES?

    • @AlesKus
      @AlesKus 5 месяцев назад

      Global excel summit

    • @YvesAustin
      @YvesAustin 5 месяцев назад

      How did Chandeep teleport back home so fast? lol

    • @chandeepchhabra
      @chandeepchhabra 5 месяцев назад

      ​@@YvesAustinM still in London. The video is was recorded earlier and scheduled😅

  • @mecorowa5642
    @mecorowa5642 5 месяцев назад +1

    With a self reference from the new table on the sheet, it is possible to keep it dynamic when further columns get added.

  • @ziggle314
    @ziggle314 5 месяцев назад +1

    This solves a problem I am dealing with right now. Thanks!

  • @whizzohk
    @whizzohk 5 месяцев назад

    Extremely useful as always Chandeep! No hard-coded column names is the key to flexible models.

  • @PankajSingh-mk9wk
    @PankajSingh-mk9wk 4 месяца назад

    Hello Chandeep, I have been following your content for one and a half year, really want to do your course but the course I want to do is very expensive. But the really good stuff keeps it going.

  • @hichamezznati2646
    @hichamezznati2646 4 месяца назад

    Very interesting .Thank you . here is an other tip i'd like to share that gives the same result, using List.Sort and without using the user interface :
    let
    Input = Cols1,
    Col = Input[Cols],
    Pos = Input[Postion No],
    ColSortingOrder = List.Reverse(
    List.Sort(
    Col,
    (x, y) =>
    Value.Compare(
    let
    Px = List.PositionOf(Col, x)
    in
    1 / Pos{Px},
    let
    Py = List.PositionOf(Col, y)
    in
    1 / Pos{Py}
    )
    )
    )
    in
    Table.ReorderColumns(Personnalisé1, ColSortingOrder)

  • @hellorich714
    @hellorich714 4 месяца назад

    Brilliant. Absolutely brilliant. Thank you. So helpful

  • @sskdev5116
    @sskdev5116 Месяц назад

    My God!!! This was something I was looking for

  • @darcyg852
    @darcyg852 2 месяца назад

    Thank you! This was so helpful!

  • @natallia1
    @natallia1 5 месяцев назад

    This is awesome! Brilliant as always.

  • @shreedharan.moorthy
    @shreedharan.moorthy 4 месяца назад

    Very interesting and useful. Thank you so much.

  • @DavidTraynier
    @DavidTraynier 5 месяцев назад

    Really smart solution and clear explanation.

  • @EricHartwigConsulting
    @EricHartwigConsulting 5 месяцев назад

    This is very awesome! Thank you for creating/sharing!
    I am curious what are your thoughts on first sorting by position number and then alphabetically sorting the first column to give some kind of pattern to the query should the column names change?

  • @natashailina5005
    @natashailina5005 5 месяцев назад

    Great video as usually! Thanks a lot

  • @IvanCortinas_ES
    @IvanCortinas_ES 5 месяцев назад

    Excellent explanation. Thank you Chandeep!!

  • @chrism9037
    @chrism9037 5 месяцев назад

    Very clever , thanks Chandeep!

  • @eddiel6608
    @eddiel6608 4 месяца назад

    Great lesson, thank you

  • @sabarashid1513
    @sabarashid1513 4 месяца назад

    That was extremely useful. I have one question - will the order be maintained when loaded to Power BI. If not, how to maintain the column orders when data is loaded from Power Query to Power BI. Any guidance would be helpful.

  • @zahir585
    @zahir585 5 месяцев назад

    Brilliant, thank you

  • @justinwduff
    @justinwduff 5 месяцев назад

    Excellent video, it's hard to find high quality M content. Pleasure meeting you @ GES, great presentation!

  • @Bhavik_Khatri
    @Bhavik_Khatri 5 месяцев назад

    Awesome Tutorials

  • @ericrobbins6953
    @ericrobbins6953 5 месяцев назад

    Very creative!

  • @ExcelUnlocked
    @ExcelUnlocked 5 месяцев назад

    Amazingly helpful

  • @briandennehy6380
    @briandennehy6380 4 месяца назад

    Lovely stuff

  • @vishnupp5944
    @vishnupp5944 3 месяца назад

    Great

  • @krishanphophalia9303
    @krishanphophalia9303 5 месяцев назад

    Awesome ❤

  • @jaybuddhadev3543
    @jaybuddhadev3543 5 месяцев назад

    always best👍

  • @shadimanci
    @shadimanci 5 месяцев назад

    How is this awesome ❤❤❤

  • @mukeshrawat2621
    @mukeshrawat2621 5 месяцев назад

    @goodly if you know Hindi , please share, it very useful understanding lots of people

  • @osamaabd-elmohsen6427
    @osamaabd-elmohsen6427 5 месяцев назад

    Hi,
    Could you make a video how we can dynamic expand monthly aggregated columns when we are merging queries, Regards

  • @ramandeepsr
    @ramandeepsr 5 месяцев назад

    ❤❤

  • @workstuff5253
    @workstuff5253 4 месяца назад

    In Power BI it doesn't seem to matter what order you put the columns in. The table view sticks them in any order it feels like! Which sucks.

  • @ExcelWithChris
    @ExcelWithChris 5 месяцев назад

    Do you have to refresh twice? First refresh will create the list for the user to type in the order and the next refresh will then do the job?

  • @datalearningsihan
    @datalearningsihan 5 месяцев назад

    I was thinking of purchasing your power query course. Is your courses regularly updated?

  • @michaelt312
    @michaelt312 5 месяцев назад +1

    How would this be impacted if column names change? Say % becomes Percent. Or a real world example, a list of employees. Someone changes their last name. Or someone leaves.

    • @ajdc3169
      @ajdc3169 5 месяцев назад +1

      Yah good question

    • @dabrain6944
      @dabrain6944 5 месяцев назад

      If the columns remain in the same order, this shouldn't affect the query, as long as you refresh the Cols-Query prior to loading the resulting query.

  • @Ypurenete
    @Ypurenete 5 месяцев назад

    Very good video. Congfats!!
    I have a problem, but a little diferent. There is a table with columnNames A, B, C and Another table without headers Column1, Column2, Column3. How can I append these tables?

    • @dabrain6944
      @dabrain6944 5 месяцев назад +1

      The second table actually has column headers, but they are generic. You can simply rename them before appending.
      let
      Table1 = TableABC,
      Table2 = TableC1C2C3,
      RenamedHeadersTable2 = Table.RenameColumns(Table2, List.Zip({Table.ColumnNames(Table2), Table.ColumnNames(Table1)}),
      AppendedTable2 = Table.Combine({Table1, RenamedHeadersTable2})
      in
      AppendedTable2

    • @Ypurenete
      @Ypurenete 5 месяцев назад

      @@dabrain6944 thanks a lot!!

  • @azlanm0305
    @azlanm0305 21 день назад

    👋👋👋👍👍👍👍

  • @jerrydellasala7643
    @jerrydellasala7643 5 месяцев назад

    Very cool! BTW, the download link isn't working.

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

      goodly.co.in/dynamic-column-re-ordering-power-query

  • @gef24
    @gef24 5 месяцев назад +3

    Instead of replacing null, I filter out null.

    • @Ratnakumarwrites
      @Ratnakumarwrites 5 месяцев назад

      Then your columns will also disappear... Correct me if i am wrong...

    • @dabrain6944
      @dabrain6944 5 месяцев назад

      No, they will not dissappear. But their order remains as it is. So it would really be better to filter out the nulls.

    • @Ratnakumarwrites
      @Ratnakumarwrites 5 месяцев назад

      I meant rows...

    • @dabrain6944
      @dabrain6944 5 месяцев назад +1

      They are actually not needed to make the query work.

  • @edsta714
    @edsta714 5 месяцев назад

    I can’t believe you cant reorder the columns in go to columns. A simple move up or down button or drag and drop from the vertical list would be so much easier.

    • @ajdc3169
      @ajdc3169 5 месяцев назад

      His technique is useful if you have a lot of columns to organize