Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Table.Sort function

I am learning Table.Sort function, got blocked.

 

In Step3, the nested Table.Sort in Table.Group, it works

But when I try to split Step3 into 2 steps, I got blocked.

I think my understanding of the input and output of Table.Group and Table.Sort is still bit off.

Hope someone can help me understand better of "Table.Sort" function.

Thank you very much.

  • In step 3 you are sorting each entry in the group.

     

    In step 5 you are trying to sort  a column of grouped entries. This won't work.

     

    If you want to break it up, step 5 is:

     

    Table.TransformColumns(Step4, {"B", each Table.Sort(_, {"Chinese"}))

4 Replies

  • artemus's avatar
    artemus
    Microsoft Employee

    In step 3 you are sorting each entry in the group.

     

    In step 5 you are trying to sort  a column of grouped entries. This won't work.

     

    If you want to break it up, step 5 is:

     

    Table.TransformColumns(Step4, {"B", each Table.Sort(_, {"Chinese"}))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for all the help artemus , I trid your solution, it works. 

      Just my understanding of Table.Group and Table.Sort, the output and input, and the datatype required for eah parameter, is still a bit off.

       

      • dax's avatar
        dax
        Community Support

        Hi Anonymous , 

        It seems that you solve the problem, right?  If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.

        Best Regards,
        Zoe Zhi

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.