10 awesome Power Query tricks you NEED to know! | Excel Off The Grid

Поділитися
Вставка
  • Опубліковано 29 чер 2024
  • ★ Want to automate Excel? Check out our training academy ★
    exceloffthegrid.com/academy
    ★ Get the example file ★
    Sign up for our free Insiders program and get the example file:
    exceloffthegrid.com/insiders-...
    File Reference for this video: 0212 Power Query M code tricks.zip
    ★ About this video ★
    In this video, we look at simple, yet powerful 10 Power Query M code tricks which you can apply today!
    0:00 Introduction
    0:15 Tip 1: Using line feed
    1:41 Tip 2: Rename column by position
    2:57 Tip 3: Rename column by position in a nested table
    5:09 Tip 4: Rename column based on a list in a nested table
    7:00 Tip 5: Expand columns without using column names
    8:28 Tip 6: Combine text in a cell with group by
    10:17 Tip 7: Group by and ignore case
    11:29 Tip 8: Get cell by position
    13:01 Tip 9: Multi-step custom column
    14:44 Tip 10: Declare column data type when adding a column
    15:29 Wrap up
    ★ Download 30 most useful Excel VBA Macros ebook for FREE ★
    exceloffthegrid.com/
    ★ Where to find Excel Off The Grid ★
    Blog: exceloffthegrid.com
    Twitter: / exceloffthegrid
    #MsExcel

КОМЕНТАРІ • 94

  • @ExcelOffTheGrid
    @ExcelOffTheGrid  22 дні тому

    Sign up for our free Insiders program and get the example file:
    exceloffthegrid.com/insiders
    File Reference for this video: 0212 Power Query M code tricks.zip

  • @larmondoflairallen4705
    @larmondoflairallen4705 23 дні тому +8

    For the "Group By" text concatenation, I find it super helpful to also use List.Sort so that any combination of the same items appears the same way, rather than in whatever random order they have in the data (e.g. "Alpha, Bravo, Charlie" always appears as such, rather than "Bravo, Alpha, Charlie" or "Charlie, Alpha, Bravo"). The default sort order is ascending, so you don't need to specify that, but you can sort it using the Order.Descending option if you want.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  23 дні тому +2

      That's a good tip. Thank you for sharing. 👍

  • @New2you09
    @New2you09 День тому

    Great video. Nice to see someone doing videos targeted at the more advanced users. 😊

  • @BIGorilla
    @BIGorilla 23 дні тому +11

    Hey Mark. Such a great video once again. My favorite tip here is the Grouping technique that allows you to ignore capitalization. Make life much easier. I got a fun article coming up that also shows you how you can summarize one column and respect case, while ignoring the case for another. In other words, custom comparers. I think you might enjoy that too!

    • @kndeepak
      @kndeepak 23 дні тому

      When when when???!!!

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      I will certainly take a look - I'm sure you'll pull out some killer info that the rest of the universe had no idea about.

  • @gabrielgordon
    @gabrielgordon 13 днів тому +2

    no worst tip! All great! Thanks

  • @timtunbridge
    @timtunbridge День тому

    Number 9 for me. I have a particular long and complex additional column and this allows me to build and test the steps incrementally. Thank you.

  • @decentmendreams
    @decentmendreams 23 дні тому +3

    Thanks Mark! The beauty of PQ is that there is 99 ways to do the same thing .
    Your presentation clean. Your solutions clean.
    All fabulous. I am going to pick #8 .

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      Thanks. Yes, there are 99 ways - and at least 95 of those are a bad idea. I know, I've done many of them before 🤣

  • @OzduSoleilDATA
    @OzduSoleilDATA 22 дні тому +4

    I love the line-feed feature. And combining text in a single cell is pretty slick! 😎

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  21 день тому

      Thanks Oz - I’m glad you enjoyed it 👍

    • @EricHartwigConsulting
      @EricHartwigConsulting 18 днів тому

      I agree the line feed code is really awesome! Thank you Mark!
      I was using Character.FromNumber(10) but I like "#(lf)" because it's less typing and still works with concatenating / & things together.

  • @BHASKARJOSHI-cw7qn
    @BHASKARJOSHI-cw7qn 23 дні тому +3

    1:03 => Even you can see the line break within data preview. To do that go to View Tab > Data Preview > Show whitespace

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  23 дні тому +1

      I had forgotten about that setting - that's a good tip.

  • @ExcelWithChris
    @ExcelWithChris 22 дні тому +2

    Great stuff. Best one for me is adding a column using a cell ref.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      I love that technique. I used to have a really long way to do it and then one day 💡 - I've never done it the old way ever again.

  • @giorgioberardi3940
    @giorgioberardi3940 15 днів тому +1

    Tip 9 is by far the best in terms of widespread applicability. No worst tip in my view. Well done!

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  14 днів тому

      Yes, lots of uses for #9 - I hope you can put it to good use.

  • @tlee7028
    @tlee7028 22 дні тому +1

    Another AWESOME tutorial !

  • @KennedyMateko
    @KennedyMateko 22 дні тому +1

    Fabulous! Thanks Mark

  • @chrisgilbert9921
    @chrisgilbert9921 23 дні тому +1

    Another GREAT video full of tips that will make my life easier. Thanks, Mark!

  • @chrism9037
    @chrism9037 23 дні тому +1

    Awesome Mark! Great video

  • @GrainneDuggan_Excel
    @GrainneDuggan_Excel 23 дні тому +1

    Mark, your explanation for multi-step custom colums using let is so helpful.

  • @patrickharilantoraherinjat2994
    @patrickharilantoraherinjat2994 19 днів тому

    Just amazing Mark. Thank you

  • @leonidkoyfman814
    @leonidkoyfman814 22 дні тому +1

    Great collection of practical and helpful tips. Thank you.

  • @Ganja1974
    @Ganja1974 22 дні тому

    Incredible tips! thanks for making my life easier using few of them right now!

  • @marcus_barao
    @marcus_barao 22 дні тому

    Thanks you for your video! Very powerfull tricks.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      You're welcome, I hope you can put them to good use.

  • @NestorCirhuza
    @NestorCirhuza 23 дні тому +1

    5 AND 6 are my favorite tips. Thank you

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      Great stuff. I think #5 should really be the default behaviour - it would save so many issues.

  • @IvanCortinas_ES
    @IvanCortinas_ES 22 дні тому +1

    Wowww. Great tutorial Mark.
    My favourite tips: Combine text in a cell with group by and Group by and ignore case.
    Thank you for sharing all tips.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  21 день тому

      👍 That’s a pretty useful tip that I’ve used in real world projects.

  • @TheLaopi
    @TheLaopi 22 дні тому

    Great, i learned a lot, thks

  • @GeertDelmulle
    @GeertDelmulle 23 дні тому +3

    Here’s a tip for you: (a rule of thumb of mine): if you need List.Zip, your query is not as simple as it can be. In general List.Zip can be avoided if you use the right combination of functions (e.g. Table.ToRows).
    BTW, FYI: List.Zip is the list equivalent of Table.Transpose.
    Do you agree?

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  23 дні тому +2

      A lot of List transformations are not very efficient, but unless it has a significant impact on refresh time, I don't tend to worry too much.
      Sometimes lists aren't from the same Table, so List.Zip isn't always the same as Table.Transpose. But in this circumstances, I agree. Yes, Table.ToRows could be a suitable alternative in this scenario.

  • @tracywilliams61
    @tracywilliams61 14 днів тому +1

    All of ticks I've experienced at least once but by far #8 is my favorite. You are a great teacher you explain the steps in a way that brings clarity to how pq makes sense THANK YOU My least favorite is NONE

  • @vipulDJhaveri
    @vipulDJhaveri 22 дні тому +1

    Simply brilliant ❤

  • @OZbMG8jsJTX14AWYne4omBw
    @OZbMG8jsJTX14AWYne4omBw 23 дні тому +1

    Молодец!

  • @michaeljones2843
    @michaeljones2843 17 днів тому

    The first tip is awesome and is one I can use the most, Thanks!

  • @japa6225
    @japa6225 14 днів тому +1

    Thanx's for blowing my mind. Going to revisit tomorrow. 🍻🍻

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  14 днів тому

      Good stuff - I hope you can pick up a few techniques.

  • @Oprimaita
    @Oprimaita 16 днів тому +1

    Great collection of good tips. My preference goes to 8 and 9 !

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  16 днів тому

      8 & 9 - I really kept you waiting until the end until the good stuff.

    • @Oprimaita
      @Oprimaita 16 днів тому

      @@ExcelOffTheGrid There were some good things right from the start 😉

  • @raimundojs9547
    @raimundojs9547 23 дні тому +3

    Mark is the Jack Bauer of Excel (doesn't he look like Kiefer Sutherland?), a super agent! Thank you for sharing! Very useful tricks with many concepts to be explored. Great!

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому +1

      The Jack Bauer of Excel... I'll take that 😁

  • @ouvangouvang5055
    @ouvangouvang5055 23 дні тому +1

    Great vidéo.

  • @zzota
    @zzota 20 днів тому

    Hi Mark, all very useful, thank you.

  • @alexrosen8762
    @alexrosen8762 22 дні тому +1

    Great and useful tips & tricks which are really helpful in real life scenarios

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      Thank you. I hope you can put them to good use. 👍

  • @ja3mi2
    @ja3mi2 23 дні тому +1

    Tip #6 - very handy.

  • @HimanshuSingh-lk2my
    @HimanshuSingh-lk2my 14 днів тому +1

    Nice 👍

  • @tomhaase1386
    @tomhaase1386 2 дні тому

    Very nice tricks, I used trick #9 it helped me a lot.
    Trick #1 with the line feed is great. But I have a problem, I have a list with those line feeds address. How do I get it back into its normal each column separated?
    Thank you for your very much for your tutorials.

  • @hazemali382
    @hazemali382 15 днів тому

    Wow More than great

  • @pierre-yves_david
    @pierre-yves_david 23 дні тому +1

    My preferred: tip #9, let / in used in a custom column formula (readability). Tip #3 is cool also (to make it simpler).
    I suggest for future ideas how to type columns automatically, e.g., using Type.Union, without hard coded column names of course (dynamic typing of dynamic columns).
    Done what follows but probably better solutions exist:
    let
    Source = (ParamTable) =>
    let
    ToUntypeTable=List.Transform(Table.ColumnNames(ParamTable), each { _ , type any}),
    UnTypedTable= Table.TransformColumnTypes(ParamTable, ToUntypeTable),
    ToRetypeTable= List.Transform(Table.ColumnNames(ParamTable), each { _ , Type.Union(List.Transform(Table.Column(UnTypedTable, _ ), Value.Type))}),
    RetypedTable= Table.TransformColumnTypes(ParamTable, ToRetypeTable)
    in
    RetypedTable
    in
    Source
    My concern is that a column of integers is typed as decimal numbers (suboptimal). And difficult to type the parameter expect by the function (created from a parametric request) as a table: a parameter, which is table associated to a sample request, is difficult to create, can't find the way easily.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому +1

      Thank you.
      I have a custom function for auto-typing columns. But it's not as good clean as yours. Looks like I got a bit of study to do.

  • @user-dn5gd1rn9f
    @user-dn5gd1rn9f 23 дні тому +1

    Excellent tips, as always! How could we not like your ideas?

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому

      Thanks - sometimes I can go a bit crazy and i get comments like "nobody will ever do this!" So, I'm glad this one hit the mark 😁

  • @user-yz6ie2qv6p
    @user-yz6ie2qv6p 22 дні тому +1

    Hi. Please could you do a similar video on loading/cleaning up PDF files to present in a long list...

  • @marcusmayer1055
    @marcusmayer1055 18 днів тому +1

    👍👍👍

  • @gonzuic
    @gonzuic 23 дні тому +1

    Thank you Mark, that was a great video, in your Power Query course, do you have that content it and more examples about advanced M code?
    Thanks

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  23 дні тому +1

      At present our Power Query course does not go into much M. When we re-record we may have a separate M course, but that is a while off yet.

  • @deepakn9796
    @deepakn9796 5 днів тому

    Hello there, i have been using the power query for quite sometime , can you please tell how to extract if the sharepoint list have more than 5000lines in it? it throws error

  • @SairamBalasubramaniam
    @SairamBalasubramaniam 21 день тому

    Mark your tips challenge with Chandeep was not as cutting edge as this one. Save the best for last. Kudos

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  17 днів тому

      Thank you. Without the Chandeep challenge, I wouldn't have thought about creating this video. So it's all thanks to Chandeep really. 😁

  • @beautifulthoughts1775
    @beautifulthoughts1775 23 дні тому

    How to make Real Estate CRM with help of Google Sheet.. please making video.🤝

  • @DinoAMAntunes
    @DinoAMAntunes 23 дні тому

    Hi Please i´m not finding the excel file to follow along? Tks in advance

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому +1

      I've pinned a comment at the top, with the URL and instructions.

  • @arpankumar4487
    @arpankumar4487 23 дні тому

    why powerquery does not support .xlsb file?????

  • @mohitchaturvedi8931
    @mohitchaturvedi8931 23 дні тому

    your camera focuse late and text appears blurred for sometime. and your screen is so large that it gives very small font on mobile screen.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  22 дні тому +1

      Most of my viewers are watching on a desktop, so I optimize for that... sorry.