Trying to output a sum of a column of a table where sum changes with user filtering

If you can make a reproducible example with sample data, it would be helpful. Find out more information here: