1 comment

  • Official comment
    Saurabh Agashe

    Thanks for the question!

    The GROUPROWNUMBER function itself does seem to be working properly as you have described. However, your description highlights an assumption about the sort order after a grouping function.

    In this example, I note that the first sheet is sorted by the Date column and then this data is grouped in a new sheet downstream. On the grouped sheet, you observe that the sort order has been disrupted from the source sheet. This is expected. Grouping functions do not automatically preserve the sort order of the original data.

    To ensure that the grouping functions sort the data to meet your needs, I'd recommend utilizing the GROUP_SORT_ASC or GROUP_SORT_DESC function with your grouped results.

    Specifically for this example, I'd recommend replacing the COPY(Date) function with GROUP_SORT_ASC(Date) to ensure that you grouped results are sorted by the Date column.

    I hope this helps!

    Comment actions Permalink

Please sign in to leave a comment.