Wrong sorting at columns that has "SUM" aggregation in grouping rows

Posted by: m.omar on 8 February 2020, 9:19 am EST

    • Post Options:
    • Link

    Posted 8 February 2020, 9:19 am EST

    Problem steps:

    1-Grid has grouping by “country” column and has “sum aggregation” at “sales” column

    2- User click on header of “sales” column to sort descending , it sorting fine in details and grouping rows values.

    3- but if user click on header of “sales” column to sort ascending, it sorting fine in details and sorting wrong in grouping rows values.

  • Posted 9 February 2020, 1:33 am EST

    Can someone help me with this?

  • Posted 10 February 2020, 12:56 am EST - Updated 3 October 2022, 5:18 pm EST

    Hi Omar,

    As per our understanding, your issue is related to how sorting is done when the data is grouped.

    When grouping is applied and the data is sorted by a column, the data is sorted first and then the groups are created. This means that the groups are not sorted according to the aggregate values instead they are sorted on the basis of the data.

    In the screenshot below, notice that the Sales column is sorted in descending order and the data inside the groups are sorted in descending order but not the groups itself.



    Let us know if this clears your doubts or otherwise.

    Regards,

    Ashwin

  • Posted 10 February 2020, 3:53 am EST

    Yes this is the issue, i want “sales aggregate values” to be sorted descending

    too.

    So your example result should be as following: https://ibb.co/bXFpzJD

  • Posted 11 February 2020, 2:56 am EST

    Any update !!

  • Posted 11 February 2020, 6:02 am EST

    Hi Omar,

    We have asked the dev team on whether this can be achieved. The tracking id of the case is 420613. We will update you as soon as we will hear from them.

    ~regards

  • Posted 16 February 2020, 1:36 am EST

    Are there any updates regarding this issue ?

  • Posted 17 February 2020, 2:21 am EST

    Hi Omar,

    We are sorry but the issue is still with the dev team. We have asked them to provide an ETA on this.

    ~regards

  • Posted 18 February 2020, 4:00 am EST

    Hi Ashwin,

    This issue affects our business so please level up its priority?

  • Posted 18 February 2020, 11:38 pm EST

    Hi,

    I have told the dev team that this issue is a show stopper for you and to resolve it at the highest priority.

    ~regards

  • Posted 20 February 2020, 1:24 am EST

    Hi,

    You can use the sortConverter property of the CollectionView to convert the values to their individual aggregated values. Please refer to the sample link below:

    https://jsfiddle.net/Wijmo5/bs42zk0r/

    ~regards

  • Posted 23 February 2020, 4:35 am EST

    Good job , it works like a charm

  • Posted 23 February 2020, 4:36 am EST

    It works perfect, thank you Ashwin.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels