See more examples and copy the code at my blog: gorilla.bi/power-query/how-list-sort-works-in-m/ And for more on the List.Sort syntax, check out: powerquery.how/list-sort/
Not quite finished watching, but thanks for an afternoon of rabbit holes, read your article on coalesce, and went down a few paths that I thought of on the way, including zipping dates and years and stuff.
That was great = thanks Rick. So just to be clear, you are creating this columns instead of the "sort" columns we need to made labels and dates sort correctly in data visuals (you called them helper columns) - correct. So I'm guessing once one has created the List.Sort column, one can remove the original column the sort is based on, and just use the List.Sort column going forward? So the model will run better/less unnecessary data columns?
This function only sorts lists. For tables you need Table.Sort. Power query keeps the table as it comes in if you don’t perform major operations. In case it does change you could either: - use Table.Buffer to load the table into memory - add an index column and sort your table by that column in the last step
I think you should do a video on when to use List.transform with functions like Number.From(_) , I always think I have to if the function being used does not have the word list in it. List.Sort( List.Transform ( {"1", "10", "2", "22" , "11" } , (_)=> Number.From(_)) ) Which obviously does change the data type. Gets a bit confusing, keep up the good work, REALLY like your COMPUTERGAGA vid on list.generate. 😊😊
That's great to hear. I tried to give a variety of examples here to get the idea. Feel free to have a look at my written blog if you'd be interested in learning more 🙏 Cheers, Rick
See more examples and copy the code at my blog:
gorilla.bi/power-query/how-list-sort-works-in-m/
And for more on the List.Sort syntax, check out: powerquery.how/list-sort/
I learn a lot of Power query with your videos!
Exactly what I’m hoping for. Really appreciate you taking the effort to comment Raymundo 🙏
wow, very great tutorial for me. learn a lot from this one
Thanks Rick learning from you is fun & intresting...
Thanks Ratna!
Not quite finished watching, but thanks for an afternoon of rabbit holes, read your article on coalesce,
and went down a few paths that I thought of on the way, including zipping dates and years and stuff.
The path down the rabbit 🐇 hole goes as deep as you go William 😎
Very useful Thank You!
Glad to hear that!
thankx for your share!
Awesome as usual
Highly appreciated Lester. Some fun tricks in here 🔥🔥
That was great = thanks Rick. So just to be clear, you are creating this columns instead of the "sort" columns we need to made labels and dates sort correctly in data visuals (you called them helper columns) - correct. So I'm guessing once one has created the List.Sort column, one can remove the original column the sort is based on, and just use the List.Sort column going forward? So the model will run better/less unnecessary data columns?
Cool! Thanks, Rick.
Thanks Gosnel!
How can I maintain the original table data sort in PowerQery? Could you help please
This function only sorts lists. For tables you need Table.Sort.
Power query keeps the table as it comes in if you don’t perform major operations. In case it does change you could either:
- use Table.Buffer to load the table into memory
- add an index column and sort your table by that column in the last step
Very nice.
Thank you! Cheers
I think you should do a video on when to use List.transform with functions like Number.From(_) ,
I always think I have to if the function being used does not have the word list in it.
List.Sort( List.Transform ( {"1", "10", "2", "22" , "11" } , (_)=> Number.From(_)) )
Which obviously does change the data type. Gets a bit confusing, keep up the good work, REALLY like your COMPUTERGAGA vid on list.generate. 😊😊
quite interesting :)
GReat video :)
That's great to hear. I tried to give a variety of examples here to get the idea. Feel free to have a look at my written blog if you'd be interested in learning more 🙏 Cheers, Rick