Bound sheet Totals not getting updated after Filter

Posted by: mehta_deepak on 8 May 2018, 8:01 am EST

  • Posted 8 May 2018, 8:01 am EST

    Hi,

    In Bound sheet the summary value is not getting updated after applying filter to the column.

    Thanks,

    Raznin

  • Posted 9 May 2018, 1:03 am EST

    Hi,

    As we understand, you are adding an extra row in the sheet and setting it’s cell values to some formula(e.g sum) to display the summary.

    Now after filtering some rows the formula result computation is still including the values from the filtered row, this is excel like behavior and FlexSheet is intended to provide excel like functionalities. Hence, it is including the filtered rows data in formula computation.

    You can confirm the excel behavior in attached sample excel file. Book1.zip

    In such case if you don’t want filtered data to be considered for formula computation, consider using subtotal function.

    Find more info on subtotal function here:- https://support.office.com/en-us/article/subtotal-function-7b027003-f060-4ade-9040-e478765b9939

    You can also refer to following sample which has subtotal formulaset in expenses column and normal sum formula in downloads and sales column.Try to filter some results and compare the difference between the two.

    http://jsfiddle.net/5bdh9goy/

    If this was not the issue you were facing then please elaborate your problem so that we could look into it.

    ~Manish

  • Posted 9 May 2018, 2:04 am EST

    Hi Manish,

    Thanks for the sample!

    I am using aggregate = “Sum” in grid columns to get the Totals Displayed.And create the Bound Sheet using this grid.

    While doing so,I noticed neither the Filter nor the Formula applied in the column updates the summary row.Is there any way we can make them work using aggregate property.

    Thanks,

    Raznin

  • Posted 9 May 2018, 11:01 pm EST

    Hi,

    If you want to use column’s aggregate property then you need to update the Aggregate value on required event. Please refer to the following sample:

    http://jsfiddle.net/4he03qh4/

    ~Manish

  • Posted 10 May 2018, 3:57 pm EST

    Hi Manish,

    I am using the ColumnFooter to show the Summary line. I tried setting the column footers value with the column sum in the filterApplied event handler,from your sample.But the change is not getting reflected in the sheet.

    Setting sum in columnfooter inside the updatedView works.But iterating through flexsheet rows(to calculate current data sum) inside the updatedView does`nt seem to be a good solution.

    Do you have a solution where the columnFooter summary line gets updated when Filter or Formula applied.Also can you please provide the link to the nightly builds download.

    Thanks,

    Raznin

  • Posted 13 May 2018, 5:01 pm EST

    Hi,

    Please send us a sample which you are working on , we can investigate the issue.

    I am not sure there’s another alternative to the approach to calculating data sum inside the Updated View. Could you please elaborate the issues you are facing with this approach?

    You can download nightly builds from here

    http://prerelease.componentone.com/wijmo5/

Need extra support?

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

Learn More

Forum Channels