The column filters do not refresh the formulas

Tags: #<Tag:0x00007efc72f9bb20> #<Tag:0x00007efc72f9b9e0>

Hello everyone,

I’m having a little issue with the implementation of Handsontable.

I’ve searched around a bit, but I don’t think I’ve found a solution, even though I believe this question has already been asked here. I was told that a fix was implemented in version 12, but I can’t seem to make it work on my end. (Formula Column doesn't filter)

Here’s what I’m trying to achieve:

27%E2%80%AFPM

I have a simple table with a list of prices in column A. At the top of my first column, I have the total calculated with the formula =SUM(A:A). However, when I filter the column to hide certain elements, the total doesn’t update automatically.

19%E2%80%AFPM

I’ve noticed that some people mention that the columns are cached and not deleted, which might explain why =SUM(A:A) doesn’t update correctly. However, I haven’t found any shared solution to resolve this issue.

In other words, I would like the column containing the formula =SUM(A:A) to recalculate automatically as we apply filters.

I have created a JSFiddle with a simple code so that you can see my implementation

https://jsfiddle.net/h7Lr8maq/

Thank you for your help :slight_smile:

Hi @disceney

Thank you for contacting us. This is actually correct behavior, as the filtered rows aren’t deleted from the data set. They are just hidden visually. That means, that under the hood they are still present, and available for the formulas engine.

The issue you linked actually was about a different problem. The situation you described can’t be currently altered in any convenient way. The possible workaround would be to manually gather the visible values and set the formula to match the current data, but we wouldn’t recommend it, as it’s a very hacky way to go around this.