Dynamic Total / Subtotal for Datatable

Hello there!

I understand this question has been asked before, but just wanted to know whether anyone has found a workaround?

My question is version similar to the following:

Data table How to get sum of column (s)

Dash Table Total

# Built-in Summary Row that Responds to Filtering, Sorting, and Editing #433

I would like for it to show a total for selected rows only.

In my case, I would like to filter it by Day of the week (Mon - Sun), with multi select, so for example in google sheets it would be something as follows:

image

And if I filter it by Saturday and Sunday, the subtotal will change accordingly.
The subtotal’s formula is this : =SUBTOTAL(109,E5:E20)

image

At the moment I am using google sheets and it’s veryyyy slow because it’s a lot of data and calculations in Python are SOOO much faster. I thought about using pandas to just add an extra row at the bottom but as I would like for it to react to the filter’s in dash, it might not be the most efficient way… (not 100% sure it’s possible either)

This is a really important part of the report I am creating, so I haven’t starting writing any code. If this can’t be done then I’ll have to find something else.

If anyone has any advice that would be great!

Hi renee,

Here you have examples of how to make a graph with data filtered in a data table:

If you can get the data then you can manage it using Pandas to create a new table as you want.
I do not know if exist any other easyest solution.