List.Generate in Power Query - Tutorial with Easy Examples
Vložit
- čas přidán 30. 07. 2024
- This video explains how List.Generate works in Power Query. You will see examples for basic number sequences, examples involving multiple variables and lastly series returning text values.
WRITTEN BLOGPOST:
gorilla.bi/power-query/list-g...
Master Functions and Syntax in M
powerquery.how
ABOUT BI Gorilla:
BI Gorilla shares videos and articles on Power BI and Excel to help you improve your skills.
SUPPORT MY CHANNEL
Any videos are made free of charge. You can support my channel by giving a donation through: paypal.me/rickmaurinus.
Website: gorilla.bi
SUBSCRIBE TO MY CHANNEL
czcams.com/users/bigorilla?sub_con...
LET'S CONNECT:
Blog: gorilla.bi
Facebook: / bigorilla
Twitter: / rickmaurinus
LinkedIn: / rickmaurinus
Thank you for your support!
Chapters:
00:00 Introduction
00:48 List.Generate Basic Number Series
08:26 List.Generate Fibonacci Sequence
14:14 List.Generate Sequence with Factorials
17:41 List.Generate Return Text Values
#ListGenerate #PowerQuery #BIGorilla
To learn more about the syntax of List.Generate, make sure to check out: powerquery.how/list-generate/
This is the one and only video where you can understand List.Generate. Microsoft documentation is surprisingly bare, inadequate to explain this complex and powerful function. Thanks Rick.
I loved the calm and clear way you explained.
Excellent!
Thank you very much!
Truly appreciate the written blog post partner to the video! Truly helpful to have them both! I know the written posts take so much time, but they are very appreciated.
Thank you so much Kimberly for your kind words. I know this function was a tough cooky for me to understand and hopefully my research gives you a kickstart.
Keep crushing it,
Rick
Thanks Rick clarifying this in calm and easy way.
Thank you for the blog and video, really appreciate it.
Thank you Rick for explaining List.Generate function in depth....love it cheers
Glad to hear that, awesome!
Extremely useful video. Thanks
Great video and explanation. Thank you.
Almost gave up on PQ until I saw this - fantastic and very powerful! Thank you. Subscribed and looking forward to watching your videos. 👍👍
Awesome. And thank you, welcome aboard!👏
Elegant, Elegant, Elegant! Simply magic, Rick! Thanks!
My pleasure suki 😁😁
Simply great. Thansk for sharing
🙏 thank you!
Great one sir !!. Thank you
Súper interesting your video. Thank you.
Awesome! Just found your channel and subscribed. Looking forward to learning more. Thumbs up!!
Thanks wayne! :)
Thanks! I'm still learning PBI and currently having a roadblock on a report I'm working on. I'll definitely utilise this function cos it might get me somewhere and see how it goes.
Muchas gracias !!!
Glad to hear that. It's an advanced function but with some examples I hope you'll manage. 😁
Don't worry @@BIGorilla, the logic and the examples were clearly explained in your vid👍🏾
Thanks again!
Thanks for sharing the video. I have one question though, I am unable to schedule refresh with the current code. Can you please help me here, on what do I change to schedule refresh on service.
Excellent 💯👍
Thanks you
Хороший контент. Спасибо.
This video is luxurious. Thank you very much. :-)
Only the best for you fajne!
Saved it !
Genius 😮
Nice tutorial
Thanks!
Thanks.
In the Fibonacci example, why are the x and y sometimes enclosed in [ ] and sometimes they are not?
In one part it's the opening of a record and in the other part the brackets reference the variable that was defined earlier. Hope that helps :)
Very nice und helpful content
Hope you find it useful!
Amazing video showing list generate its a function that isnt well documented so appreciate the video, on the part with factorial numbers should the selector for "Y" also be Y=[X]=1 as on that loop it would have been using X as the initial value so you get the duplicate line with 1? Im only asking to try to understand the function :) I really enjoyed the video
Hi Glyn,
That's a good point. You could improve the code by starting with Y = 1, and starting with x = 2. This would mean that the first returned result is Y = 1. The next value then is the Number.Factorial( 2), so for X = 2. With that change, the result would be a list showing:
{1, 2, 6, 24, 120, 720, 5040, 40320, 362880 }
Or the full code:
= List.Generate(
() => [x = 2, y = 1], // x = increasing series, y = factorial
each [x]
@@BIGorilla brilliant thanks for the explanation!
Hello Good Night, Can you share a video with a table with 100 rows and 3 columns for example, and you want to split that table in 10 sub-tables, automatically, and 10 new excel sheets. tks in advance.
In the factorial example shouldn't it be y = Number.Factorial ( x ) ---ie. not [x] otherwise the two lists are not the same
Hi there, I used your instruction but once I apply the changes it takes 20 hrs. so data be loaded and I have 1200000 rows of data. can you please help me out find the problem?