Need a special offer?Find out if your project fits.
+

Pin Grand Totals to the top

Answered
Akshay Alva asked on September 27, 2021

Hi,
Is it possible to pin the totals to the top of the table in classic view ?
 
Warm Regards,
Akshay

6 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 27, 2021

Hello, Akshay,
 
 
Thank you for reaching out to us.
 
Currently, pinning the totals to the top of the table is only available for the flat view. You may find helpful following thread where the similar question was discussed: https://www.flexmonster.com/question/grand-totals-as-first-row-or-column-in-pivot-table/
 
Please let us know if any questions arise.
 
 
Kind regards,
Nadia

Public
Akshay Alva January 7, 2022

Hi Nadia,
Thanks for your reply. I have checked the other threads and found this conversation and proposed workaround solution which we are considering..
https://www.flexmonster.com/question/show-subtotal-and-grand-total-in-first-row-in-classic-form/
In this example - https://jsfiddle.net/flexmonster/5arusLwg/  the 'Go Back' button does not return the original position. Can you confirm if it works as desired ?
 
We are also considering creating our own Totals Row outside the table (we use classic form), which can read the 'Grand Totals' row from the table data. The following thread mentions we can use the getData function to achieve this.
https://www.flexmonster.com/question/how-to-get-grand-total-value-of-measure/
Could you elaborate a bit more on how specifically we can get the 'Grand Totals' values from the last row using getData ?
Any pointers would be helpful.
 
Warm Regards,
Akshay

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 11, 2022

Hello, Akshay,
 
Thank you for the response.
 

  1. You are right that the mentioned example doesn't work as expected. It is caused by using virtual scroll in our component. We suggest using the scrollToColumn and scrollToRow API calls with the column or row number to ensure that everything works correctly. You are welcome to check the new sample in the following JSFiddle: https://jsfiddle.net/flexmonster/rju23gza/9/
  2. To get the Grand Total values, you can use the getData API call. Each object with totals contains either values (v0 - vN) and columns (c0 - cN) or values and rows (r0 - rN). Kindly note that it is necessary to set the slice parameter containing only columns and measures to show the Grand Totals values from the last row. Please check the approach illustrated in the following sample: https://jsfiddle.net/flexmonster/dj0b97y1/.
    More information on how to use the getData method can be found in our documentation: https://www.flexmonster.com/api/getdata/.

 
We hope it helps. You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia

Public
Akshay Alva March 3, 2022

Hi Nadia,
Thanks for your reply! We have implemented our custom additional 'Grand Total' row below the table which uses the getData Api call. This works well for the default table when no filters/selections are applied (as seen in screenshot 1). 
I would like to know a recommended solution for us to get the updated grandTotal value when the filter selection is applied so we can update our custom grand total row on every filter selection.

Attachments:
Snip20220304_6.png

Public
Akshay Alva March 3, 2022

2nd screenshot - filters applied

Attachments:
Snip20220304_8.png

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 4, 2022

Hello, Akshay,
 
Thank you for the response.
 
In your case, we suggest using the optional parameter of getData updateHandler - a function that tracks if the data in the pivot table was filtered/sorted/etc or a number format was changed. More information you can find in our documentation: https://www.flexmonster.com/api/getdata/
Kindly check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/dj0b97y1/59/
 
Please let us know if it works for you. Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Please login or Register to Submit Answer