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?
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. 😊😊
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
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 🙏
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 😎
wow, very great tutorial for me. learn a lot from this one
Very useful Thank You!
Glad to hear that!
Awesome as usual
Highly appreciated Lester. Some fun tricks in here 🔥🔥
Cool! Thanks, Rick.
Thanks Gosnel!
thankx for your share!
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?
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. 😊😊
Very nice.
Thank you! Cheers
quite interesting :)
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
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