Sort subtotals

Answered
Subramanian asked on November 8, 2023

Hey team, 
     Is there a way to sort totals column by default in compact and classic form

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 8, 2023

Hello, Subramanian!
 
Thank you for reaching out to us.
 
Kindly note that you can define sorting by Total Price column in your report as follows:

 slice: {
// other slice properties
      sorting: {
        column: {
          type: "desc",
          tuple: [],
          measure: {
            "uniqueName": "Price", //your field uniqueName
            "aggregation": "sum"
          }
        }
      },
}

We have prepared a JSFiddle to illustrate the idea: https://jsfiddle.net/flexmonster/z6s79orb/.
 
Also, the easiest way of configuring the report is by using the following steps:

  1. Configure the desired report visualization via Flexmonster UI
  2. Save the report using the Save Toolbar tab
  3. Open report.json in any text editor
  4. Copy the necessary part of the report to your project.

You are welcome to watch the short YouTube video illustrating this approach: https://youtu.be/GC4C7XLjccc?si=baorUYEqfp3ete3R.
 
Hope you will find our answer helpful.
 
Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 21, 2023

Hello, Subramanian!

Hope you are doing well.

Our team is wondering if you had some time to check out the suggested approach for sorting the total column. Could you please let us know if it was helpful?

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 29, 2023

Hello, Subramanian!

Hope you are having a great week.

Just checking in to ask if our example was helpful in sorting the total column.

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Public
Subramanian November 30, 2023

Hi Solomiia,
Yes, the above solution is worked well. Thanks

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 1, 2023

Hello, Subramanian!

Thank you for your feedback.

We are glad to hear the suggested approach works well for you.

Feel free to reach out to us in case of any other questions.

Kind regards,
Solomiia

Please login or Register to Submit Answer