Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Custom total function

Laurie Atkinson asked on October 11, 2019

We’ve evaluated the pivot table and it has all the features that we need except for one. I see this question was answered in 2018, but was hoping the answer has changed. We need to use a custom function for the totals. In our case only specific items should be included in the total.
As a workaround, I created a calculated column that only includes the rows I want and I show the total there, but the users were not satisfied with that solution.
Another thought was to code for the expand/collapse event of the group and modify the DOM to show my custom total, but I’d like to avoid that and I’m not sure if it would even work.
So, has this feature been added or is it on the roadmap? If not, can you think of a workaround? I don’t want to abandon the flexmonster pivot table for this one missing feature.

1 answer

Vera Didenko Flexmonster October 15, 2019

Thank you for writing to us.
We kindly suggest using the customizeCell hook:
You can change the Total’s cell text to display the desired value.
Also, it is possible to hide the unneeded columns/rows by setting their width to 0 via the tableSizes object.
Here is a JSFiddle example of how the last column is hidden from the grid:
Please let us know if you have any questions.
Best Regards,

Please login or Register to Submit Answer