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

Sdílet
Vložit
  • čas přidán 28. 06. 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

Komentáře • 94

  • @ExcelOffTheGrid
    @ExcelOffTheGrid  Před 21 dnem

    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

  • @New2you09
    @New2you09 Před 3 hodinami

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

  • @timtunbridge
    @timtunbridge Před 4 hodinami

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

  • @BIGorilla
    @BIGorilla Před 22 dny +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 Před 21 dnem

      When when when???!!!

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

      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 Před 12 dny +2

    no worst tip! All great! Thanks

  • @larmondoflairallen4705
    @larmondoflairallen4705 Před 22 dny +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.

  • @decentmendreams
    @decentmendreams Před 22 dny +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  Před 21 dnem

      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 Před 21 dnem +4

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 20 dny

      Thanks Oz - I’m glad you enjoyed it 👍

    • @EricHartwigConsulting
      @EricHartwigConsulting Před 17 dny

      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.

  • @giorgioberardi3940
    @giorgioberardi3940 Před 14 dny +1

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 13 dny

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

  • @Oprimaita
    @Oprimaita Před 15 dny +1

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 15 dny

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

    • @Oprimaita
      @Oprimaita Před 15 dny

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

  • @raimundojs9547
    @raimundojs9547 Před 22 dny +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!

  • @ExcelWithChris
    @ExcelWithChris Před 21 dnem +2

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

      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.

  • @BHASKARJOSHI-cw7qn
    @BHASKARJOSHI-cw7qn Před 22 dny +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  Před 22 dny +1

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

  • @IvanCortinas_ES
    @IvanCortinas_ES Před 21 dnem +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  Před 20 dny

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

  • @GrainneDuggan_Excel
    @GrainneDuggan_Excel Před 22 dny +1

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

  • @GeertDelmulle
    @GeertDelmulle Před 22 dny +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  Před 22 dny +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.

  • @chrisgilbert9921
    @chrisgilbert9921 Před 22 dny +1

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

  • @tomhaase1386
    @tomhaase1386 Před dnem

    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.

  • @NestorCirhuza
    @NestorCirhuza Před 21 dnem +1

    5 AND 6 are my favorite tips. Thank you

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

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

  • @japa6225
    @japa6225 Před 13 dny +1

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 13 dny

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

  • @leonidkoyfman814
    @leonidkoyfman814 Před 21 dnem +1

    Great collection of practical and helpful tips. Thank you.

  • @tracywilliams61
    @tracywilliams61 Před 12 dny +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

  • @tlee7028
    @tlee7028 Před 21 dnem +1

    Another AWESOME tutorial !

  • @chrism9037
    @chrism9037 Před 22 dny +1

    Awesome Mark! Great video

  • @user-yz6ie2qv6p
    @user-yz6ie2qv6p Před 21 dnem +1

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

  • @michaeljones2843
    @michaeljones2843 Před 16 dny

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

  • @user-dn5gd1rn9f
    @user-dn5gd1rn9f Před 22 dny +1

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

      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 😁

  • @KennedyMateko
    @KennedyMateko Před 21 dnem +1

    Fabulous! Thanks Mark

  • @marcus_barao
    @marcus_barao Před 21 dnem

    Thanks you for your video! Very powerfull tricks.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

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

  • @Ganja1974
    @Ganja1974 Před 21 dnem

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

  • @pierre-yves_david
    @pierre-yves_david Před 22 dny +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  Před 21 dnem +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.

  • @patrickharilantoraherinjat2994

    Just amazing Mark. Thank you

  • @vipulDJhaveri
    @vipulDJhaveri Před 21 dnem +1

    Simply brilliant ❤

  • @alexrosen8762
    @alexrosen8762 Před 21 dnem +1

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem

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

  • @ja3mi2
    @ja3mi2 Před 22 dny +1

    Tip #6 - very handy.

  • @TheLaopi
    @TheLaopi Před 21 dnem

    Great, i learned a lot, thks

  • @zzota
    @zzota Před 19 dny

    Hi Mark, all very useful, thank you.

  • @OZbMG8jsJTX14AWYne4omBw
    @OZbMG8jsJTX14AWYne4omBw Před 22 dny +1

    Молодец!

  • @HimanshuSingh-lk2my
    @HimanshuSingh-lk2my Před 13 dny +1

    Nice 👍

  • @ouvangouvang5055
    @ouvangouvang5055 Před 22 dny +1

    Great vidéo.

  • @hazemali382
    @hazemali382 Před 14 dny

    Wow More than great

  • @gonzuic
    @gonzuic Před 22 dny +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  Před 22 dny +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.

  • @beautifulthoughts1775
    @beautifulthoughts1775 Před 22 dny

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

  • @marcusmayer1055
    @marcusmayer1055 Před 16 dny +1

    👍👍👍

  • @deepakn9796
    @deepakn9796 Před 4 dny

    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 Před 19 dny

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 16 dny

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

  • @arpankumar4487
    @arpankumar4487 Před 22 dny

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

  • @DinoAMAntunes
    @DinoAMAntunes Před 22 dny

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

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Před 21 dnem +1

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

  • @mohitchaturvedi8931
    @mohitchaturvedi8931 Před 22 dny

    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  Před 21 dnem +1

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