...I think I need to add SUBTOTAL and OFFSET ...
Yes, this is generally where people go however, OFFSET introduces Volatility which, given SUMPRODUCT etc, can have an adverse impact on performance, depending on size of data, number of calcs etc.
Given above, I would advise adding a visible flag field to the source table - and utilising that, as a multiplier, in your SUMPRODUCT
e.g. within Data_New table add a column that simply returns 0/1 pending visible status of row:
let's assume you called this field "Visible"... we can add that to your existing calculation:
by adding this visible binary flag you automatically adjust the result, without introducing any volatility.
Bookmarks