Advanced Group By Tricks in Power Query

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

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

  • @fateenibrahim3423
    @fateenibrahim3423 Год назад +6

    I really appreciate how you go through writing the M code step by step, coz its allowed me to break down the steps and know exactly where went wrong i.e. if i pulled a list instead of a table first for a function for tables. Thanks a lot!!

  • @KawanExcel
    @KawanExcel 2 года назад +26

    This guy always make me amaze with his stuff .... Thankyou chandeep... You are the best teacher ever

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

      Thank you for your inspiring words 💚😊

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

    You lead RUclips in amount of information retained per second. All of your videos pack so much information in such a short amount of time. Thank you so much for the content.

  • @pbiqueryous
    @pbiqueryous 2 года назад +7

    This has came at the PERFECT time! I've been asking myself these questions with advanced transformations for nested Tables, Lists and Records. I still have many questions - but you have again shined a bright guiding light in a world full of data darkness! Thank you bhaai-jaan!
    PS: Also amazed that you InteliSense works 🤣 - and so rapidly! What is this wizardry!? 🧙🏽‍♂️

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

      Thanks for your nice words & also glaf it was helpful 💚

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

    Sir, the way you explain and decode the M language is Super!, I took courses on Power Query from various other platforms but all the topics covers on the user interface and it didn't cover the topics where it requires dynamic data changes, Thanks for your conceptual training.

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

    Thanks again, Chandeep!

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

      Thanks a lot Carl ... Appreciate the gesture :)

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

      I don't know how many hours of work you've saved me, especially your grouped index column video. Your explanation of it was the only one I could understand clearly. : )

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

    Thanks!

  • @BrainyBrunetteBarbie
    @BrainyBrunetteBarbie 2 года назад +1

    I like to think of the Advanced Editor as the *true* user interface. Your videos have shown me so many new tricks! Thank you!

  • @miazhou8902
    @miazhou8902 2 года назад +1

    Hi man, you explain things very clearly. You surely are one of the best teachers.

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

    Great work, man! I'm just silent!
    I've searched this solution for weeks, but unsuccessfully when somebody didnt suggest me do this with next step.
    But you did it with one professional mode! :)

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

    Hi, this tick with text.combine is really great. Is there a possibility to combine also numbers (with out converting to text)?
    Currently I need two steps, one step in group_by: {"Single_Qty", each [Qty]}, and a 2nd step to extract the values: Extract Values from List = Table.TransformColumns(GroupedRows, {"Single_Qty", each Text.Combine(List.Transform(_, Text.From), "#(lf)"), type text})
    Do you have any approach to combine it in one group_by step?
    Thank and Cheers.

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

    Thanks, I had a hunch that the editor could be leveraged in this way but I just started using PowerBI and did not have the language and syntax knowledge yet. Great jumpstart -Thank you!

  • @wildecorrea6477
    @wildecorrea6477 2 года назад +2

    🇧🇷 One of the best Power Query codes I've seen! Congratulations!

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад +1

      Thank you 💚

    • @wildecorrea6477
      @wildecorrea6477 2 года назад +1

      @@GoodlyChandeep 🇧🇷 Keep up the good work, man! 👊🏻👏🏻👏🏻👏🏻🔝

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

    Simply Amazing... What a new way to get an approach to the problem....!!!

  • @AirPunkt
    @AirPunkt 2 года назад +1

    Wow, this is amazing! Thank you so much for sharing - It solved one of my main problems at work!
    🙋🏼‍♂️from 🇩🇪

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

    Very informative and knowledgeable video...you clearly explained every step. Thnx for this video.

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

    The more I watch the more I learn! Thanks again Chandeep!

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

    You are the man! I did that concat a list but it took me MANY steps and helper columns. Your way is very clear and elegant. Will be replacing mine with yours.

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

      Glad it was helpful 💚

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

      @@GoodlyChandeep I was able to take it one step further and added List.Sort for the items in the Concatenation. Look cleaner if the machines, in my case, are listed in order. Would not have been possible with my 'old' way of doing this. Thanks again!

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

    Thanks chandeep, you are making us think in different way to solve problem in Power query...that's really helpful... excellent video..👍👍

  • @excel-in-g
    @excel-in-g 2 года назад +5

    You can also use the Group By and Sum the column you want to concatenate. For sure it returns an error first. But then in the formula replace List.Sum by Text.Combine and remember to complete it with the delimiter in the right place.

    • @pabeader1941
      @pabeader1941 2 года назад +1

      Not quite. You still need to create the distinct list of Customers before you can use the Text.Combine function.

    • @excel-in-g
      @excel-in-g 2 года назад +3

      True, thanks for completing my answer as such avoding miscomprehension.
      I only wanted to point out the UI helps you discover and understand the logic behind M more then you'd realize. I often use the UI to give me a basic code that I can afterwards finetune.

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

    This is an absolutely perfect video and solution. That is precisely what I wanted for my issue mainly. I had been bouncing my head here and there and finally found this fantastic video. Thank you for sharing it, and keep up the excellent work.

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

    Great video. Just one suggestion that please consider making your speaking window smaller or cropping it to only show your body, so that audiences get to see more screen. I found a few videos of yours that you were deleting/moving steps that we can’t actually see what’s been deleted and moved. Nevertheless, Thanks for making such wonderful and educational videos for free to us all here.

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

    Your videos are just fantastic - so clear and with content that is so relevant to business requirements. Thank you!

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

    good stuff. i usually do this SQL and python.... i find M code too much detailed and stuffed but I feel its power... hope they will continue improving the UI for non coders

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

    This solution couldn't come in a better time, the concatenation suggestion solved the main issue I had with some data transformation. Thank you Chandeep. First video that I watched on your channel and definitely not the last one. Thank you once again.

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

    You are the best teacher of power bi😍😍

  • @subramanianayyappan9759
    @subramanianayyappan9759 6 месяцев назад

    You are a super Genius man !!...Thanks a lot for sharing your knowledge ! love your explanation

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

    Thank you! It is exactly what i have been searching for some days!

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

    i learn something new from you every time
    Thanks chandeep ji

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

    Mind blowing. Thanks for sharing such a fantastic feature.

  • @zanodeloza2636
    @zanodeloza2636 10 месяцев назад

    Thanks a lot. It helps with my project. Will definitely enroll in your M course

  • @MacarServicios
    @MacarServicios 2 года назад +3

    Muchas Gracias Chandeep, me encantan tus videos, son muy claros y me han servido mucho!. Sigue así 👍👍

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

    Wowww. Awesome. Superb explanation Chandeep!

  • @alexrosen8762
    @alexrosen8762 2 года назад +1

    Very very useful tutorial especially because of the value it brings where the use cases are enormous in real life job situation tasks

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

    Awesome man. This is exactly what I was looking for! Thank you.

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

    Fantastic!!! High level - but easy to understand!

  • @TVSCDN
    @TVSCDN 10 месяцев назад +1

    Thanks sirji🎉🎉🎉❤❤❤😊
    Can you also show how to BI a Bank PDF Statement Analysis easily😮

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

    Fantastic 💯👍

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

    At 4:16, the function creates a column that holds tables at each row. What confuses me is how the each function results in Tables since it is used in the context of a table. In your excellent video on the each function, the one thing I got was each would behave based on the context of what object its used in. Here its used in the context of a table and results in a table. Is it because a bunch of rows are the result and a bunch of rows = table?

  • @jean-marcherard9216
    @jean-marcherard9216 2 года назад +1

    Hi Chandeep, great video.
    Case 1, any hint on how would you concatenate values on 2 columns ?
    afer using advanced group by in the Ui ...

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

    Wonderful data manipulation Chandeep!!

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

    This is so amazingly useful !!!! And so well explained. Thank you Chandeep !!! 😁

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

    Great work chandeep 👌👍 just want to know where is practice file of this particular video. Please tell me

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

    Genius! Thanks for putting this training video out here. Great information!

  • @gauravsukhadia638
    @gauravsukhadia638 2 года назад +2

    Hi @Goodly What happens when there is a tie ? for example if two years have the same max value ? I am currently learning sql so in sql there are a windows functions called Row and Rank to deal with this level of complexity but I am not sure if we have any for M code.

  • @KuldeepSingh-nq1vi
    @KuldeepSingh-nq1vi 2 года назад

    This is again a amazing and informative Video, you are the guy from whom I learnt so much about M Language.

  • @chiragdabhi4929
    @chiragdabhi4929 2 года назад +1

    Is this possible to use count if function in power quary.
    In number of date colum ..I want use countif(range,>0.5)
    Range = number of colum..
    ??

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

    Your really amazing 🥰. Love from Andhra Pradesh

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

    Thanks Chandeep for sharing this. This is a very important topic you touched. I work more with Power Query than DAX and having the ability to do such amazing transformations helps a lot. Will play around with this.

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад +1

      Thanks for your nice words Jay! 💚

    • @jaymehta3320
      @jaymehta3320 2 года назад +1

      @@GoodlyChandeep And utilized it (Group By - concatenate values of a List) today on a real project as well. Thanks again!

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

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

  • @papettipaolo
    @papettipaolo 8 месяцев назад

    Thats an amazing video! Thank you for sharing! I was actually trying to do the opposite i.e transform a field with multiple value into mutiple lines with one value only per each line, any guidance?

  •  2 года назад

    Amaizing video, thanks, with wich keys you can give format to the function in the formula bar? Like indent code or pull a row of code into the next line? thanks

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

    You are teaching for video all very well😍.thank !

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

    Excellent. Have you got a video which would point me to the right direction for mapping two lists and filtering on condition? Say we have a one row table with col1 [a, b, c], col 2 [1, 0, 1], col3 (output) [a, c]

    • @GoodlyChandeep
      @GoodlyChandeep  7 месяцев назад +1

      If you have a table just filter it on the second column containing 1.
      If you have lists. download this file. goodly.co.in/wp-content/uploads/2024/06/For-Rokas.xlsx

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

      @@GoodlyChandeep appreciate your answer, but what I meant is that each row of a column contains a list. In this example, col C1 row 1 would be a list [a, b, c], col C2 row 1 would also be a list [1, 0, 1] and the output col C3 should then be a list of letters from the list in C1 corresponding to 1s from the list in C2, in this case [a, c]. I'll give it another try. Thanks for your help anyway. Your videos are indispensable.
      Edit: solved by creating a temp column with tables from lists in C1 and C2, then filtering that table by selecting rows that match the condition, then selecting column with letters, and turning it back to list and text combining it. Convoluted, but works. Not sure if it will scale for millions of rows though :)

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

    When you create video in beginning the quality was not good but now the quality is good

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

      hi Kunal, why did not like the videos before. can you point out what do you like now and why?

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

    This was amazing! Love how you explain everything!

  • @rm8168
    @rm8168 8 месяцев назад

    Thank you ! This was another great educational video.

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

    Brilliant! Thanks a lot for this and many other short practical videos you produced and shared! :)

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

    Thank you for sharing your advance tricks in PQ

  • @learningmadesimple347
    @learningmadesimple347 2 года назад +1

    Really great video... But what would you do if there were more than 1 year with the max value??

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

      Not sure, but probably some ranking technique to extract every record ranked 1.

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

    thanks for your video. let me further understand the lookup in power query

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

    Seriously, genius. 🎉

  • @kdhivyabharathi6493
    @kdhivyabharathi6493 8 месяцев назад

    Hello Sir, I have a small doubt.. What is the difference between group function and aggregate function? In real time, based on which scernio we will decide to use for group by or aggregate function ?

  • @joviee.6246
    @joviee.6246 Год назад

    Dude much appreciated! Great explanation and came at a great time as well

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

    You are always awesome to come up with new learning for us. It is very helpful.

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

    Amazing!!!!!!! thank you for sharing your knowledge!!

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

    Hi Chandeep as usal awesome vedio.
    I have one doubt what if i need to get the sales for the particular year like 2004, or if need filter for one text in a column

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

    Awesome video!! I have being looking for this future for a while, is it possible to create two list? Let's say that I want to summary the total of pallets list.count I guess and then all of the different quantity, it worked with list.distinct, I want to get a new column that summarizes the total amount of pallets per material nr and the distribution of cuantity , similar to what you did. Output should be " 2 pallets* 400 Qty, 1 pallet*250units . I can send you the information so you can see the data

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

    Thank you so much. This is exactly what I need.

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

    Glad to find your content. Subscribed.

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

    Thanks Chandeep! Amazing scenarios and their solutions
    I love how you breakdown approaching M coding and tweaking the code generated by powerquery

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

    great video, Chandeep. just wish you supplied your dataset to make learning easier.

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад +1

      All the blogs are supplied with dataset - goodly.co.in/blog/

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

      @@GoodlyChandeep fantastic. thank you!

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

    Hello Chandeep, nice work. I have a question. Is it possible to invoke a function without creating a new column?

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

    Thanks!! I have seen similar other solution and this is the most simple and efficient. It is like 3 step only 😎

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

    Thank you for your really usefull tips.

  • @deevssriyarathne4191
    @deevssriyarathne4191 2 года назад +1

    When extracting the year, how do you handle the error if you have more than one maximum sales value per person?

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

      Table.Max function only picks up 1 value even if there are multiple values found.

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

    Thanks for the wonderful video! Very precise and useful!

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

    You are really good. Thanks for your content. I am interested in filtering and grouping each table, and then combining. I can't seem to find a video in which you do that. Can you direct me or create something new?

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

    thank you so much, thank youtube suggest what I am looking for

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

    Actually, thank you but we can do that with 1 of M- Code function (table.column), and then extract our valu with any type of delimiter you need ?

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

    Hi Chandeep,
    When you are taking a live power bi training session?

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

    Thanks for the video, very informative 👍👍

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

    Excellent tutorial. You teach how to think in M Language. Thank you very much. :-)

  • @fajnefajne4339
    @fajnefajne4339 2 года назад +4

    I just wonder how to show both MaxSalesYears in case there were 2 or 3 years with the same max Sales Value.

    • @360iamme
      @360iamme Год назад +1

      I was a little confused as well because I thought we were going to SUM the sales by Year first or Sum them by customer first.

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

    Good stuff Chandeep

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

    Great. Thanks so much. Loved it!

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

    You are really the best!!

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

    Muito boa a dica, obrigado por compartilhar!

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

    Hi Chandeep, need your expertise please, I have a datasets where there are 5 different amount fields with corresponding 5 different payment date for each payment , I want to get the amount paid for each payment date by year. Any thought on how I could get it done? Thank you kindly for your expertise! Yami

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

    Bro... you made my day.

  • @helloworld9034
    @helloworld9034 8 месяцев назад

    and if not Text insted is a value?

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

    Sir, lesson was great help.. pls help me on how to get sum the of concatenated values in same query.

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад +1

      Monica, you can use the Group By feature and SUM happens to be a standard column calculation that you can use!

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

    Such a great content 👏

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

    Hi Chandeep.. Very useful content once again. Cheers for that.
    I have a use case where the source data is excel. The excel contains countries with sales figures and for every new year sales, the values are maintained in a separate column.
    For the reporting purpose, I have to transpose all those yearly sales columns into the rows.
    The query breaks if any new column for new year is added or deleted from the excel.
    Do you have any solution for this ?

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

      Use unpivot to bring years in one column and sales in another column

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

      @@YasirKhalid1 : unpivoting columns generate a M-Code which contains column header names which are unpivoted.
      If any of these column headers are deleted or changed in the source, the M-Code will throw an error that it couldn't find that deleted column in the source.
      I want to make this dynamic as possible where the unpivot code should work even if columns are added or deleted in the source.

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

      @@kartikwat this other video below by Chandeep deals with the same topic
      Convert the headers to a list/table and identify pattern to generate errors either on the dimension columns or the fact columns
      Use that to filter the headers dynamically by using unpivot columns or unpivot other columns. Hope this helps
      ruclips.net/video/zoJfoMrjvi4/видео.html

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

      @@kartikwat alternatively as a dirty hack for dynamic selection select a larger range in your query to accommodate for any future columns and use MissingField.Ignore in your formula (plz lookup syntax) to weed out columns with no data

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

    You are awesome! thank you very much!

  • @SwapnilJagtap-v2l
    @SwapnilJagtap-v2l 11 месяцев назад

    how to enable auto suggestion formula when we edit formula bar?

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

    Thanks a lot again bro, great tips

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

    Very good, well done.

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

    Great video. Is it possible to do full course on power query?

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

      Already have one! Check here goodly.podia.com/power-query-course

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

      @@GoodlyChandeep I have noticed it is 1 year old. Are you planning to upgrade it to capture all your tricks and anything new?

  • @RavinderKumar-gl8cy
    @RavinderKumar-gl8cy Год назад

    Sir, How we can do the function similar to Indirect function in Excel, in power BI. For Ex. I am having a slicer with the name of all Indian states, If I don't select any thing from slicer, then in the table for ROW value , name of state should come and their population. If I select any state from slicer , then in the table, respective district list should appear and there population.
    Thanks in advance.