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

Custom total function

Answered
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

Public
Vera Didenko Vera Didenko Flexmonster October 15, 2019

Hello, 
 
Thank you for writing to us.
 
We kindly suggest using the customizeCell hook: https://www.flexmonster.com/api/customizecell/
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: https://jsfiddle.net/flexmonster/9m21zox7/
 
Please let us know if you have any questions.
 
Best Regards,
Vera

Please login or Register to Submit Answer